Data Encryption

Data is encrypted before any physical data is written and it is decrypted after any physical data has been read.

You must specify the name of the user-supplied encryption library in the cryptLibrary property before an open, openAsynch, listen, or listenAsynch method operation.

You must specify the name of the encryption method in the encryptMethod property. The encryption method must have the following C++ signature.

int JOMAPI encrypt (BYTE *pDataIn,
                    Size dataInLength,
                    BYTE **ppDataOut,
                    Size *pDataOutLength);

You must specify the name of the decryption method in the decryptMethod property. The decryption method must have the following C++ signature.

int JOMAPI decrypt (BYTE *pDataIn,
                    Size dataInLength,
                    BYTE **ppDataOut,
                    Size *pDataOutLength);

If character data is passed in or out, your routines must be aware of the ANSI or Unicode character size (that is, 1 byte for ANSI and 2 bytes for Unicode).

The encryption and decryption methods return the following values.

Value Description
0 The encryption or decryption routine was successful
Non-zero The encryption or decryption routine failed