Click or drag to resize

MessageSignatureSignMessage Method

Computes the hash value of the specified byte array using the specified hash algorithm, and signs the resulting hash value.

Namespace:  PKI.Utils
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax
public static byte[] SignMessage(
	X509Certificate2 certificate,
	byte[] message,
	Oid hashAlgorithm
)

Parameters

certificate
Type: System.Security.Cryptography.X509CertificatesX509Certificate2
An X509Certificate2 object of the signer certificate.
message
Type: SystemByte
Message to be signed.
hashAlgorithm
Type: System.Security.CryptographyOid
The name of the hash algorithm to use in the signature. For example, 'SHA256'

Return Value

Type: Byte
The signature for the specified data.
See Also