RSACng::SignHash Method (array<Byte>^, HashAlgorithmName, RSASignaturePadding^)

 

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

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public:
virtual array<unsigned char>^ SignHash(
	array<unsigned char>^ hash,
	HashAlgorithmName hashAlgorithm,
	RSASignaturePadding^ padding
) override

Parameters

hash
Type: array<System::Byte>^

The hash to sign.

hashAlgorithm
Type: System.Security.Cryptography::HashAlgorithmName

The hash algorithm name.

padding
Type: System.Security.Cryptography::RSASignaturePadding^

The padding mode.

Return Value

Type: array<System::Byte>^

The signed data.

Exception Condition
ArgumentNullException

hash is null.

-or-

padding is null.

ArgumentException

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

CryptographicException

.NET Framework
Available since 4.6
Return to top
Show: