22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A.164 <strong>DLI</strong> <strong>Reference</strong> <strong>Guide</strong><br />

certificate type.<br />

2 The last parameter is a required callback function. This function will be called<br />

during the dlpdfdocwritepdf function call. It will be passed a character string<br />

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

containing the SHA-1 hash for the PDF file being written, as a NULL-terminated<br />

string of hexadecimal digits using PKCS #1 padding, containing a BER OID<br />

(object identifier) for the SHA-1 algorithm. The buffer is 256 bytes long (not<br />

including the NULL terminator), <strong>and</strong> formatted as<br />

0001FFFF .. FF003021300906052B0E03021A05000414<br />

[ 40 hex digits for SHA-1 hash ]<br />

The callback function must encrypt this hash value with the private key<br />

corresponding to the public key in the signature's x.509 certificate, <strong>and</strong> fill the<br />

buffer passed in with 256 hexadecimal digits representing the encrypted value for<br />

the supplied BER formatted hash. A 1024-bit key is used for encryption<br />

operations. Note that the signed hash will not have padding, <strong>and</strong> must be exactly<br />

256 hexadecimal digits. Zeros must be used for padding, if required.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!