Redigera

Dela via


ECDsaCng.SignHash(Byte[]) Method

Definition

Generates a signature for the specified hash value.

public:
 override cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash);
public override byte[] SignHash (byte[] hash);
[System.Security.SecurityCritical]
public override byte[] SignHash (byte[] hash);
override this.SignHash : byte[] -> byte[]
[<System.Security.SecurityCritical>]
override this.SignHash : byte[] -> byte[]
Public Overrides Function SignHash (hash As Byte()) As Byte()

Parameters

hash
Byte[]

The hash value of the data to be signed.

Returns

Byte[]

A digital signature for the specified hash value.

Attributes

Exceptions

hash is null.

The key information that is associated with the instance does not have a private key.

Remarks

The KeyContainerPermissionFlags.Sign flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the ECDsaCng object.

Applies to