Example of Column Level Encryption

The following example illustrates how to use the built-in encryption and decryption functions of Informix® to create and use a table that stores encrypted credit card numbers in a column that has a character data type.

For purposes of this example, assume that the plain text of the values to be encrypted consists of strings of 16 digits. Because encryption functions support character data types, these values are stored in a CHAR column rather than in an INT, BIGINT, or INT8 column.