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
)
Public Shared Function SignMessage (
certificate As X509Certificate2,
message As Byte(),
hashAlgorithm As Oid
) As Byte()
public:
static array<unsigned char>^ SignMessage(
X509Certificate2^ certificate,
array<unsigned char>^ message,
Oid^ hashAlgorithm
)
static member SignMessage :
certificate : X509Certificate2 *
message : byte[] *
hashAlgorithm : Oid -> byte[]
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:
ByteThe signature for the specified data.
See Also