
XYGATE
®
Data Protection
™
Reference Manual
Appendix E: XDP API Procedures
XYPRO Technology Corporation
138
Proprietary and Confidential
E8:
__XYPRO_ENCR_DECRYPT
short __XYPRO_ENCR_DECRYPT (long _far *encr_ctx /* input*/
, short n_encr_key_len /* input */
, char _far *encr_key /* input */
, short _far *nencr_error /* output */
, long unused);
Triggers the actual decryption of data previously added using
__XYPRO_ENCR_ADD_ENCRYPT_DATA()
. After
calling this function, all data is decrypted and ready for retrieval using
__XYPRO_ENCR_GET_ENCRYPT_DATA()
.
This function uses WAITed i/o. If NOWAIT i/o is desired, use
__XYPRO_ENCR_SEND_TO_ENCR_SRV()
instead.
Parameters
Returns 0 when successful. Refer to the list of error codes in the XDP manual for a description of the
error code values.
encr_ctx
A pointer to the previously allocated context area (refer to
__XYPRO_ENCR_MEMBLK_SIZE ()
on
page 129
nencr_key_len
The length of the key contained in
sencr_key
.
sencr_key
This is NOT an actual encryption key; it is a value that is passed to the encryption provider to reference
the actual database key. For the VOLTAGE encryption provider it is a string in the format
"YYYYMMDDHHMNSSZ". This is a date time string that is expressed in UTC as indicated by the trailing
“Z”. Changing this value is one way to roll the encryption key, but all data previously encrypted using a
different date time value then cannot be decrypted unless the original date time value used to encrypt it
was preserved. Encryption key rolling can also be done on the Voltage key server and that method is the
preferred way to roll the encryption key.
nencr_error
Returns 0 when successful. Some XDP error codes are generic so a sub error code is also returned
describing the error in more detail. This parameter receives that sub error code.
Example:
#include "xdpdecth (declarations)"
...
char *encr_ctx; /* Encryption context pointer */
short nerror /* Receives error codes */
,nencr_error /* Encryption API detailed error code */
;
char sencr_key[16] = { "20141001130000Z" }; /* Fmt: YYYYMMDDHHMNSSZ */
nerror = __XYPRO_ENCR_DECRYPT ((long _far *) encr_ctx
,(short) strlen(sencr_key)
,(char _far *) sencr_key
,(short _far *) &nencr_error);
Summary of Contents for Trinitron WEGA KV-DZ29M91
Page 2: ......