IncrementalHash Class

Definition

Provides support for computing a hash or Hash-based Message Authentication Code (HMAC) value incrementally across several segments.

public ref class IncrementalHash sealed : IDisposable
public sealed class IncrementalHash : IDisposable
type IncrementalHash = class
    interface IDisposable
Public NotInheritable Class IncrementalHash
Implements IDisposable
Inheritance
IncrementalHash
Implements

Properties

AlgorithmName

Gets the name of the algorithm being performed. HMAC algorithms are prepended with "HMAC" to distinguish them from an unkeyed digest.

HashLengthInBytes

Gets the output size of this hash or HMAC algorithm, in bytes.

Methods

AppendData(Byte[])

Appends the specified data to the data already processed in the hash or HMAC.

AppendData(Byte[], Int32, Int32)

Appends the specified number of bytes from the specified data, starting at the specified offset, to the data already processed in the hash or Hash-based Message Authentication Code (HMAC).

AppendData(ReadOnlySpan<Byte>)

Appends the specified data to the data already processed in the hash or Hash-based Message Authentication Code (HMAC).

CreateHash(HashAlgorithmName)

Creates an IncrementalHash for the specified algorithm.

CreateHMAC(HashAlgorithmName, Byte[])

Creates an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm using the specified hash algorithm and key.

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

Create an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm utilizing the hash algorithm specified by hashAlgorithm, and a key specified by key.

Dispose()

Releases the resources used by the current instance of the IncrementalHash class.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetCurrentHash()

Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

GetCurrentHash(Span<Byte>)

Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

GetHashAndReset()

Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData methods, and resets the object to its initial state.

GetHashAndReset(Span<Byte>)

Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, and resets the object to its initial state.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryGetCurrentHash(Span<Byte>, Int32)

Attempts to retrieve the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(ReadOnlySpan<Byte>) methods, without resetting the object to its initial state.

TryGetHashAndReset(Span<Byte>, Int32)

Attempts to finalize the hash computation after the last data is processed by the hash algorithm.

Applies to