GetSignatureContentsHashHex

Digital signatures

Description

Returns the VRI key of a signature: the uppercase-hex SHA-1 over its contents.

Syntax

Delphi

Function TPDFlib.GetSignatureContentsHashHex(Const InputFile, Password, FieldName: WideString): AnsiString;

Parameters

InputFileThe signed PDF.
PasswordThe password to open it, or an empty string.
FieldNameA signature field name as reported by the signature enumeration.

Return values

HashForty uppercase hex characters.
Empty stringThe file or the field could not be read.

Remarks

This is the key an AddPAdESDSSVRI entry is addressed by, so validation material written for the signature can be tied back to it.

The document is read with a shared handle, so this answers while a verifier or viewer already holds the file open.

See also

GetSignatureSignerCertificateDER, AddPAdESDSSVRI