DSACryptoServiceProvider::SignHash Method (array<Byte>^, String^)
Computes the signature for the specified hash value by encrypting it with the private key.
Assembly: mscorlib (in mscorlib.dll)
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.
| 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.
for permission to sign a file using the key. Security action: Demand. Associated enumeration: KeyContainerPermissionFlags::Sign
Available since 1.1