RSA::SignData Method (array<Byte>^, HashAlgorithmName, RSASignaturePadding^)

 

Computes the hash value of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value.

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

public:
array<unsigned char>^ SignData(
	array<unsigned char>^ data,
	HashAlgorithmName hashAlgorithm,
	RSASignaturePadding^ padding
)

Parameters

data
Type: array<System::Byte>^

The input data for which to compute the hash.

hashAlgorithm
Type: System.Security.Cryptography::HashAlgorithmName

The hash algorithm to use to create the hash value.

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

The padding mode.

Return Value

Type: array<System::Byte>^

The RSA signature for the specified data.

Exception Condition
ArgumentNullException

data is null.

-or-

padding is null.

ArgumentException

hashAlgorithm.Name is null or String::Empty.

.NET Framework
Available since 4.6
Return to top
Show: