Show / Hide Table of Contents

Class HashAlgorithmType

Represents the type of .

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

Inheritance
Object
HashAlgorithmType
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
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
public int DigestSize { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

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 Source

Digest(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 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
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

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 input.

| Improve this Doc View Source

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 input.

| Improve this Doc View Source

Equals(HashAlgorithmType)

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

Equals(Nullable<Object>)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
Nullable<Object> obj
Returns
Type Description
Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
| Improve this Doc View Source

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 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 .

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String

Operators

| Improve this Doc View Source

Equality(HashAlgorithmType, HashAlgorithmType)

Checks if two HashAlgorithmTypes refers to the same 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

true iff two operands refers to the same class.

| Improve this Doc View Source

Inequality(HashAlgorithmType, HashAlgorithmType)

Checks if two HashAlgorithmTypes do not refer to the different 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 class.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium