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.

DSACryptoServiceProvider::SignHash Method (array<Byte>^, String^)

 

Computes the signature for the specified hash value by encrypting it with the private key.

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

public:
array<unsigned char>^ SignHash(
	array<unsigned char>^ rgbHash,
	String^ str
)

Parameters

rgbHash
Type: array<System::Byte>^

The hash value of the data to be signed.

str
Type: System::String^

The name of the hash algorithm used to create the hash value of the data.

Return Value

Type: array<System::Byte>^

The DSA signature for the specified hash value.

Exception Condition
ArgumentNullException

The rgbHash parameter is null.

CryptographicException

The cryptographic service provider (CSP) cannot be acquired.

-or-

There is no private key.

This method creates a digital signature that is verified using the VerifyHash method.

DSA uses the SHA1 hash algorithm.

KeyContainerPermissionAccessEntryCollection

for permission to sign a file using the key. Security action: Demand. Associated enumeration: KeyContainerPermissionFlags::Sign

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft