Show / Hide Table of Contents

Class HashAlgorithmType

Represents the type of HashAlgorithm.

It is guaranteed that only one instance is created for the same subclass of HashAlgorithm.

Inheritance
Object
HashAlgorithmType
Implements
IEquatable<HashAlgorithmType>
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
[Pure]
public sealed class HashAlgorithmType : IEquatable<HashAlgorithmType>

Properties

| Improve this Doc View Source

DigestSize

The length of bytes of every digest that the HashAlgorithmType makes.

Declaration
[Pure]
public int DigestSize { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Type

The Type object which refers to a subclass of HashAlgorithm.

Declaration
[Pure]
public Type Type { get; }
Property Value
Type Description
Type

Methods

| Improve this Doc View Source

Digest(ImmutableArray<Byte>)

Computes a hash digest of the hash algorithm from the given input bytes.

Declaration
[Pure]
public ImmutableArray<byte> Digest(ImmutableArray<byte> input)
Parameters
Type Name Description
ImmutableArray<Byte> input

The bytes to compute its hash.

Returns
Type Description
ImmutableArray<Byte>

The hash digest derived from input.

| Improve this Doc View Source

Digest(Byte[])

Computes a hash digest of the hash algorithm from the given input bytes.

Declaration
[Pure]
public byte[] Digest(byte[] input)
Parameters
Type Name Description
Byte[] input

The bytes to compute its hash.

Returns
Type Description
Byte[]

The hash digest derived from input.

| Improve this Doc View Source

Digest(IEnumerable<ImmutableArray<Byte>>)

Computes a hash digest of the hash algorithm from the given chunks of input bytes.

Declaration
[Pure]
public ImmutableArray<byte> Digest(IEnumerable<ImmutableArray<byte>> chunks)
Parameters
Type Name Description
IEnumerable<ImmutableArray<Byte>> chunks

The chunks of bytes to compute its hash.

Returns
Type Description
ImmutableArray<Byte>

The hash digest derivied from input chunks.

| Improve this Doc View Source

Digest(IEnumerable<Byte[]>)

Computes a hash digest of the hash algorithm from the given chunks of input bytes.

Declaration
[Pure]
public byte[] Digest(IEnumerable<byte[]> chunks)
Parameters
Type Name Description
IEnumerable<Byte[]> chunks

The chunks of bytes to compute its hash.

Returns
Type Description
Byte[]

The hash digest derivied from input chunks.

| Improve this Doc View Source

Equals(HashAlgorithmType)

Declaration
[Pure]
public bool Equals(HashAlgorithmType other)
Parameters
Type Name Description
HashAlgorithmType other
Returns
Type Description
Boolean
| Improve this Doc View Source

Equals(Object)

Declaration
[Pure]
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)
| Improve this Doc View Source

GetHashCode()

Declaration
[Pure]
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()
| Improve this Doc View Source

Of<T>(T)

Creates a HashAlgorithmType which refers to T.

Declaration
[Pure]
public static HashAlgorithmType Of<T>(T objectToInferType = null)
    where T : HashAlgorithm
Parameters
Type Name Description
T objectToInferType

An optional object to make the compiler infers the type parameter T from this. Note that the value in itself is never used at runtime.

Returns
Type Description
HashAlgorithmType

A HashAlgorithmType which refers to T.

Type Parameters
Name Description
T

A subclass of HashAlgorithm.

| Improve this Doc View Source

ToString()

Declaration
[Pure]
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Operators

| Improve this Doc View Source

Equality(HashAlgorithmType, HashAlgorithmType)

Checks if two HashAlgorithmTypes refers to the same HashAlgorithm class.

Declaration
[Pure]
public static bool operator ==(HashAlgorithmType left, HashAlgorithmType right)
Parameters
Type Name Description
HashAlgorithmType left

An instance.

HashAlgorithmType right

Another instance.

Returns
Type Description
Boolean

true iff two operands refers to the same HashAlgorithm class.

| Improve this Doc View Source

Inequality(HashAlgorithmType, HashAlgorithmType)

Checks if two HashAlgorithmTypes do not refer to the different HashAlgorithm class.

Declaration
public static bool operator !=(HashAlgorithmType left, HashAlgorithmType right)
Parameters
Type Name Description
HashAlgorithmType left

An instance.

HashAlgorithmType right

Another instance.

Returns
Type Description
Boolean

false iff two operands refers to the same HashAlgorithm class.

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium