Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft