SQL - DECRYPT Function

Syntax

DECRYPT (string1,string2)

Description

In BBj 4.0 and higher, the DECRYPT() function, and counterpart ENCRYPT() function, supports encrypted fields. In the syntax, string1 is the string to decrypt, and string2 is the mode line for encryption as described in the DECRYPT verb documentation. The return value is the decrypted string as produced by the DECRYPT verb.

Mode

Value

Description

CRYPTALG=

AES-128

AES-256

Uses AES-128 bit encryption, which is also the default.

In BBj 6.0 and higher, and PRO/5 6.0 and higher, uses AES-256 bit encryption.

Example

Select A,DECRYPT(B,'CRYPTPASS=abcde') from SecureTable



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.