GetSignedDocHash

Declaration

Delphi

function GetSignedDocHash(var status: Integer; var outLen: Integer): Pointer;

C/C++

SOPAD_API LPVOID SOPAD_GetSignedDocHash(int* status, int* outLen);

ActiveX

HRESULT GetSignedDocHash([out] long* Status, [out, retval] VARIANT* Result);

Description

Function retrieves signed document hash from signature device. Final document hash must be set with the help of function SetFinalDocumentHash.

Arguments

status

Output parameter. Hash calculation status. Status is defined by low 4 bits and high 4 bits. If the pad is not accessible the status is set to value 255 = FFh.

Status bitsValueDescription
Bits 0..31Computations are finished and OK has been pressed
2Retry has been pressed
3Cancel hash been pressed
4Error status, comes from emulation mode, not from device
Bits 4..70Hash calculation is not yet finished by device
1Hash calculation is finished

outLen

Hash size in bytes.

Return value

Function returns pointer to memory block with final hash. In case of failure function returns nil or zero-size array.