Class HashAlgorithmType
Represents the type of
It is guaranteed that only one instance is created for the same subclass of
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
public sealed class HashAlgorithmType : IEquatable<HashAlgorithmType>
Properties
| Improve this Doc View SourceDigestSize
The length of bytes of every digest that the HashAlgorithmType makes.
Declaration
public int DigestSize { get; }
Property Value
Type | Description |
---|---|
Int32 |
Type
The Type object which refers to a subclass of
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
| Improve this Doc View SourceDigest(IEnumerable<ImmutableArray<Byte>>)
Computes a hash digest of the hash algorithm from the given chunks
of
input bytes.
Declaration
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 |
Digest(IEnumerable<Byte[]>)
Computes a hash digest of the hash algorithm from the given chunks
of
input bytes.
Declaration
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 |
Digest(ImmutableArray<Byte>)
Computes a hash digest of the hash algorithm from the given
input
bytes.
Declaration
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 |
Digest(Byte[])
Computes a hash digest of the hash algorithm from the given
input
bytes.
Declaration
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 |
Equals(HashAlgorithmType)
Declaration
public bool Equals(HashAlgorithmType other)
Parameters
Type | Name | Description |
---|---|---|
HashAlgorithmType | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Nullable<Object>)
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Object> | obj |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Of<T>(T)
Creates a HashAlgorithmType which refers to T
.
Declaration
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 |
Returns
Type | Description |
---|---|
HashAlgorithmType | A HashAlgorithmType which refers to |
Type Parameters
Name | Description |
---|---|
T | A subclass of |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
| Improve this Doc View SourceEquality(HashAlgorithmType, HashAlgorithmType)
Checks if two HashAlgorithmTypes refers to the same
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 |
|
Inequality(HashAlgorithmType, HashAlgorithmType)
Checks if two HashAlgorithmTypes do not refer to the different
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 |
|