Bewerken

Share via


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

Definition

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

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 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