Click or drag to resize

PdfSignatureContentGetHash Method

Gets the hash over which the signature was computed, if the hash is contained in the PdfSignatureContent; otherwise, .

If the PdfSignatureContent is a DER-encoded CMS binary data object and conforms to RFC 5652 Cryptographic Message Syntax, the hash is either the value of the encapContentInfo field within the SignedData (if eContent field within the EncapsulatedContentInfo is not empty, in which case hashAlgorithm is SHA1 because the PdfSignatureContent is in the PKCS7_SHA1 format) or the value of the MessageDigest signed attribute (if present).

If the PdfSignatureContent is a TimeStampToken as specified in RFC 3161 as updated by RFC 5816, the hash is the value of the messageImprint field within the TimeStampToken.


Namespace: SautinSoft.Pdf.Forms
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.11.10
Syntax
public byte[] GetHash(
	out PdfHashAlgorithm hashAlgorithm
)

Parameters

hashAlgorithm  PdfHashAlgorithm
The hash algorithm that was used to compute the returned hash.

Return Value

Byte
The hash over which the signature was computed, if the hash is contained in the PdfSignatureContent; otherwise, .
See Also