RSACng.SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) Method

Definition

Signs data that was hashed by using the specified hashing algorithm and padding mode.

C#
public override byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);

Parameters

hash
Byte[]

The hash to sign.

hashAlgorithm
HashAlgorithmName

The hash algorithm name.

padding
RSASignaturePadding

The padding mode.

Returns

Byte[]

The signed data.

Exceptions

hash is null.

-or-

padding is null.

The value of the Name property of hashAlgorithm is null or Empty.

padding does not equal Pkcs1 or Pss.

Applies to

Produkt Verzie
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5