IncrementalHash.GetCurrentHash Method

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.

Overloads

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.

GetCurrentHash()

Source:
IncrementalHash.cs
Source:
IncrementalHash.cs
Source:
IncrementalHash.cs

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.

public byte[] GetCurrentHash ();

Returns

Byte[]

The computed hash or HMAC.

Exceptions

The object has already been disposed.

Applies to

.NET 9 dan versi lain
Produk Versi
.NET 5, 6, 7, 8, 9

GetCurrentHash(Span<Byte>)

Source:
IncrementalHash.cs
Source:
IncrementalHash.cs
Source:
IncrementalHash.cs

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.

public int GetCurrentHash (Span<byte> destination);

Parameters

destination
Span<Byte>

The buffer to receive the hash or HMAC value.

Returns

The number of bytes written to destination.

Exceptions

destination has a Length value less than HashLengthInBytes.

The object has already been disposed.

Applies to

.NET 9 dan versi lain
Produk Versi
.NET 5, 6, 7, 8, 9