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

Definition

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

public:
 override cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public override byte[] SignHash (byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
override this.SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Overrides Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()

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

See also