ECDsa.HashData Method

Definition

Computes the hash value of binary data.

Overloads

HashData(Stream, HashAlgorithmName)

When overridden in a derived class, computes the hash value of the specified binary stream by using the specified hashing algorithm.

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

When overridden in a derived class, computes the hash value of the specified portion of a byte array by using the specified hashing algorithm.

HashData(Stream, HashAlgorithmName)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

When overridden in a derived class, computes the hash value of the specified binary stream by using the specified hashing algorithm.

C#
protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
C#
protected abstract byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);

Parameters

data
Stream

The binary stream to hash.

hashAlgorithm
HashAlgorithmName

The algorithm to use to hash the data.

Returns

Byte[]

The hashed data.

Exceptions

A derived class must override this method.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.4, 1.6, 2.0, 2.1

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

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

When overridden in a derived class, computes the hash value of the specified portion of a byte array by using the specified hashing algorithm.

C#
protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
C#
protected abstract byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);

Parameters

data
Byte[]

The data to be hashed.

offset
Int32

The index of the first byte in data to be hashed.

count
Int32

The number of bytes to hash.

hashAlgorithm
HashAlgorithmName

The algorithm to use to hash the data.

Returns

Byte[]

The hashed data.

Exceptions

A derived class must override this method.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.4, 1.6, 2.0, 2.1