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

Definition

Computes the signature for the specified hash value using the specified padding.

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

Parameters

hash
Byte[]

The hash value of the data to be signed.

hashAlgorithm
HashAlgorithmName

The hash algorithm used to create the hash value of the data.

padding
RSASignaturePadding

The padding.

Returns

Byte[]

The RSA signature for the specified hash value.

Exceptions

data or padding is null.

hashAlgorithm.Name is null or Empty.

padding is unknown, or not supported by this implementation.

-or-

This instance represents only a public key.

-or-

An error occurred creating the signature.

Applies to

Toode Versioonid
.NET Core 1.0, Core 1.1, 6
.NET Standard 2.0 (package-provided)

See also