Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


Kmac256.HashData Method

Definition

Overloads

HashData(Byte[], Byte[], Int32, Byte[])

Computes the hash of data using the KMAC256 algorithm.

HashData(Byte[], Stream, Int32, Byte[])

Computes the hash of a stream using the KMAC256 algorithm.

HashData(ReadOnlySpan<Byte>, Stream, Int32, ReadOnlySpan<Byte>)

Computes the hash of a stream using the KMAC256 algorithm.

HashData(ReadOnlySpan<Byte>, Stream, Span<Byte>, ReadOnlySpan<Byte>)

Computes the hash of a stream using the KMAC256 algorithm.

HashData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32, ReadOnlySpan<Byte>)

Computes the hash of data using the KMAC256 algorithm.

HashData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

Computes the hash of data using the KMAC256 algorithm.

HashData(Byte[], Byte[], Int32, Byte[])

Source:
Kmac256.cs

Computes the hash of data using the KMAC256 algorithm.

C#
public static byte[] HashData(byte[] key, byte[] source, int outputLength, byte[]? customizationString = default);

Parameters

key
Byte[]

The KMAC key.

source
Byte[]

The data to hash.

outputLength
Int32

The size of the hash to produce.

customizationString
Byte[]

An optional customization string. The default is no customization string.

Returns

Byte[]

The hash of the data.

Exceptions

outputLength is negative.

key or source is null.

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10

HashData(Byte[], Stream, Int32, Byte[])

Source:
Kmac256.cs

Computes the hash of a stream using the KMAC256 algorithm.

C#
public static byte[] HashData(byte[] key, System.IO.Stream source, int outputLength, byte[]? customizationString = default);

Parameters

key
Byte[]

The KMAC key.

source
Stream

The stream to hash.

outputLength
Int32

The size of the hash to produce.

customizationString
Byte[]

An optional customization string. The default is no customization string.

Returns

Byte[]

The hash of the data.

Exceptions

source does not support reading.

outputLength is negative.

key or source is null.

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10

HashData(ReadOnlySpan<Byte>, Stream, Int32, ReadOnlySpan<Byte>)

Source:
Kmac256.cs

Computes the hash of a stream using the KMAC256 algorithm.

C#
public static byte[] HashData(ReadOnlySpan<byte> key, System.IO.Stream source, int outputLength, ReadOnlySpan<byte> customizationString = default);

Parameters

key
ReadOnlySpan<Byte>

The KMAC key.

source
Stream

The stream to hash.

outputLength
Int32

The size of the hash to produce.

customizationString
ReadOnlySpan<Byte>

An optional customization string. The default is no customization string.

Returns

Byte[]

The hash of the data.

Exceptions

source does not support reading.

outputLength is negative.

source is null.

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10

HashData(ReadOnlySpan<Byte>, Stream, Span<Byte>, ReadOnlySpan<Byte>)

Source:
Kmac256.cs

Computes the hash of a stream using the KMAC256 algorithm.

C#
public static void HashData(ReadOnlySpan<byte> key, System.IO.Stream source, Span<byte> destination, ReadOnlySpan<byte> customizationString = default);

Parameters

key
ReadOnlySpan<Byte>

The KMAC key.

source
Stream

The stream to hash.

destination
Span<Byte>

The buffer to fill with the hash.

customizationString
ReadOnlySpan<Byte>

An optional customization string. The default is no customization string.

Exceptions

source does not support reading.

source is null.

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10

HashData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32, ReadOnlySpan<Byte>)

Source:
Kmac256.cs

Computes the hash of data using the KMAC256 algorithm.

C#
public static byte[] HashData(ReadOnlySpan<byte> key, ReadOnlySpan<byte> source, int outputLength, ReadOnlySpan<byte> customizationString = default);

Parameters

key
ReadOnlySpan<Byte>

The KMAC key.

source
ReadOnlySpan<Byte>

The data to hash.

outputLength
Int32

The size of the hash to produce.

customizationString
ReadOnlySpan<Byte>

An optional customization string. The default is no customization string.

Returns

Byte[]

The hash of the data.

Exceptions

outputLength is negative.

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10

HashData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

Source:
Kmac256.cs

Computes the hash of data using the KMAC256 algorithm.

C#
public static void HashData(ReadOnlySpan<byte> key, ReadOnlySpan<byte> source, Span<byte> destination, ReadOnlySpan<byte> customizationString = default);

Parameters

key
ReadOnlySpan<Byte>

The KMAC key.

source
ReadOnlySpan<Byte>

The data to hash.

destination
Span<Byte>

The buffer to fill with the hash.

customizationString
ReadOnlySpan<Byte>

An optional customization string. The default is no customization string.

Exceptions

An error has occurred during the operation.

The platform does not support KMAC256. Callers can use the IsSupported property to determine if the platform supports KMAC256.

Applies to

.NET 10 és .NET 9
Termék Verziók
.NET 9, 10