RSACryptoServiceProvider.SignHash Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Computes the signature for the specified hash value by encrypting it with the private key.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- rgbHash
- Type:
System.Byte
[]
The hash value of the data to be signed.
- str
- Type: System.String
The hash algorithm identifier (OID) 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.
Show: