Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Expression >

GETHINT Function

The GETHINT function returns a character string that a previously executed SET ENCRYPTION PASSWORD statement defined for the password that was used when encrypted_data was encrypted by the ENCRYPT_AES function or by the ENCRYPT_TDES function. This hint string typically provides information that helps the user to specify the password needed to return the plain text version of encrypted_data with the DECRYPT_CHAR or DECRYPT_BINARY decryption function. The hint string, however, should not be the same as the password. In the following example, a query returns the hint string into a host variable called myhint:

EXEC SQL SELECT GETHINT(creditcard) INTO :myhint 
   FROM customer WHERE id = :myid;

An error is returned, rather than a hint string, if the encrypted_data argument to the GETHINT function is not an encrypted string or an encrypted large object.

For additional information about using data encryption in column values of Dynamic Server databases, see Encryption and Decryption Functions, and SET ENCRYPTION PASSWORD.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]