IncrementalHash Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
AppendData(Byte[], Int32, Int32) |
Append |
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 |
CreateHMAC(HashAlgorithmName, Byte[]) |
Create an IncrementalHash for the Hash-based Message Authentication Code (HMAC)
algorithm utilizing the hash algorithm specified by |
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>) |
Create an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm utilizing the hash algorithm specified by |
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for