DSACryptoServiceProvider.SignHash(Byte[], String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Computes the signature for the specified hash value by encrypting it with the private key.
public:
cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ rgbHash, System::String ^ str);
public byte[] SignHash (byte[] rgbHash, string? str);
public byte[] SignHash (byte[] rgbHash, string str);
member this.SignHash : byte[] * string -> byte[]
Public Function SignHash (rgbHash As Byte(), str As String) As Byte()
Parameters
- rgbHash
- Byte[]
The hash value of the data to be signed.
- str
- String
The name of the hash algorithm used to create the hash value of the data.
Returns
The DSA signature for the specified hash value.
Exceptions
The rgbHash
parameter is null
.
The cryptographic service provider (CSP) cannot be acquired.
-or-
There is no private key.
Remarks
This method creates a digital signature that is verified using the VerifyHash method.
DSA uses the SHA1 hash algorithm.
Applies to
See also
Обратная связь
https://aka.ms/ContentUserFeedback.
Ожидается в ближайшее время: в течение 2024 года мы постепенно откажемся от GitHub Issues как механизма обратной связи для контента и заменим его новой системой обратной связи. Дополнительные сведения см. в разделеОтправить и просмотреть отзыв по