Table of Contents

Class UnkeyedCryptoHash<TAlgorithm>

Namespace
Cuemon.Security.Cryptography
Assembly
Cuemon.Security.Cryptography.dll

Represents the base class from which all implementations of cryptographic hashing algorithm should derive. Implements the Hash<TOptions>

public abstract class UnkeyedCryptoHash<TAlgorithm> : Hash<ConvertibleOptions>, IHash, IConfigurable<ConvertibleOptions> where TAlgorithm : HashAlgorithm

Type Parameters

TAlgorithm

The type of the HashAlgorithm to implement.

Inheritance
UnkeyedCryptoHash<TAlgorithm>
Implements
Derived
Inherited Members

Constructors

UnkeyedCryptoHash(Func<TAlgorithm>, Action<ConvertibleOptions>)

Initializes a new instance of the UnkeyedCryptoHash<TAlgorithm> class.

protected UnkeyedCryptoHash(Func<TAlgorithm> initializer, Action<ConvertibleOptions> setup)

Parameters

initializer Func<TAlgorithm>

The function delegate that will initialize an instance of HashAlgorithm derived class.

setup Action<ConvertibleOptions>

The ConvertibleOptions which need to be configured.

Exceptions

ArgumentNullException

initializer cannot be null.

Properties

Initializer

Gets the function delegate responsible for initializing an instance of a HashAlgorithm derived class.

protected Func<TAlgorithm> Initializer { get; }

Property Value

Func<TAlgorithm>

The function delegate responsible for initializing an instance of a HashAlgorithm derived class.

Methods

ComputeHash(Byte[])

Computes the hash value for the specified byte[].

public override HashResult ComputeHash(byte[] input)

Parameters

input Byte[]

The byte[] to compute the hash code for.

Returns

HashResult

A HashResult containing the computed hash code of the specified input.

See Also