Upraviť

Zdieľať cez


IncrementalHash Class

Definition

Provides support for computing a hash or 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

Get the name of the algorithm being performed.

HashLengthInBytes

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

Methods

AppendData(Byte[])

Append the entire contents of data to the data already processed in the hash or HMAC.

AppendData(Byte[], Int32, Int32)

Append count bytes of data, starting at offset, to the data already processed in the hash or HMAC.

AppendData(ReadOnlySpan<Byte>)

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

Clone()

Creates a new instance of IncrementalHash with the existing appended data preserved.

CreateHash(HashAlgorithmName)

Create an IncrementalHash for the algorithm specified by hashAlgorithm.

CreateHMAC(HashAlgorithmName, 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.

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

Release all 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()

Retrieve the hash or HMAC for the data accumulated from prior calls to AppendData(Byte[]), and return to the state the object was in at construction.

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