Shake256.Read Method

Definition

Overloads

Read(Span<Byte>)

Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods without resetting the object to its initial state and allowing additional calls to continue retrieving the hash.

Read(Int32)

Retrieves the hash for the data accumulated from prior calls to the AppendData methods without resetting the object to its initial state and allowing additional calls to continue retrieving the hash.

Read(Span<Byte>)

Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods without resetting the object to its initial state and allowing additional calls to continue retrieving the hash.

C#
public void Read(Span<byte> destination);

Parameters

destination
Span<Byte>

The buffer to fill with the hash.

Exceptions

An error has occurred during the operation.

The object has already been disposed.

The platform does not support multiple reads of the hash. GetHashAndReset(Span<Byte>) can be used to perform a single operation.

Applies to

.NET 10 and .NET 9
Product Versions
.NET 9, 10

Read(Int32)

Retrieves the hash for the data accumulated from prior calls to the AppendData methods without resetting the object to its initial state and allowing additional calls to continue retrieving the hash.

C#
public byte[] Read(int outputLength);

Parameters

outputLength
Int32

The size of the hash to produce.

Returns

Byte[]

The computed hash.

Exceptions

outputLength is negative.

An error has occurred during the operation.

The object has already been disposed.

The platform does not support multiple reads of the hash. GetHashAndReset(Int32) can be used to perform a single operation.

Applies to

.NET 10 and .NET 9
Product Versions
.NET 9, 10