User Guide

Decrypt 571
Decrypt
Description
Decrypts a string that is encrypted using a standard encryption technique, including strings
encrypted by the
Encrypt function.
Returns
An unencrypted string.
Category
Security functions, String functions
Function syntax
Decrypt(encrypted_string, key[, algorithm[, encoding]])
See also
Duplicate
, Encrypt
ColdFusion MX 7: Added the algorithm and encoding parameters.
Parameters
Parameter Description
encrypted_string String to decrypt.
key String. For the CFMX_COMPAT algorithm, the seed that was used to encrypt
the string; for all other algorithms, the key that was used to encrypt the string.
algorithm (Optional) The algorithm to use to decrypt the string. Must be the same as the
algorithm used to encrypt the string. ColdFusion MX installs a cryptography
library with the following algorithms:
CFMX_COMPAT: the algorithm used in ColdFusion MX and prior releases.
This algorithm is the least secure option (default).
AES: the Advanced Encryption Standard specified by the National Institute
of Standards and Technology (NIST) FIPS-197.
BLOWFISH: the Blowfish algorithm defined by Bruce Schneier.
DES: the Data Encryption Standard algorithm defined by NIST FIPS-46-3.
DESEDE: the "Triple DES" algorithm defined by NIST FIPS-46-3.
If you install a security provider with additional cryptography algorithms, you
can also specify any of its string encryption and decryption algorithms.
encoding (Optional; if you specify this parameter, you must also specify the
algorithm
parameter.) The binary encoding used to represent the data as a string. Must
be the same as the algorithm used to encrypt the string.
Base64: the Base64 algorithm, as specified by IETF RFC 2045.
Hex: the characters A-F and 0-9 represent the hexadecimal byte values.
UU: the UNIX standard UUEncode algorithm (default) .