GetSignedDocHash

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 bits

Value

Description

Status bits

Value

Description

Bits 0..3

1

Computations are finished and OK has been pressed

2

Retry has been pressed

3

Cancel hash been pressed

4

Error status, comes from emulation mode, not from device

Bits 4..7

0

Hash calculation is not yet finished by device

1

Hash 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.