encrypt
Overview ColdFusion Open BlueDragon LuceeEncrypts a string. Uses a symmetric keybased algorithm, in which the same key is used to encrypt and decrypt a string. The security of the encrypted string depends on maintaining the secrecy of the key. Uses an XORbased algorithm that uses a pseudorandom 32bit key, based on a seed passed by the user as a function parameter.
Attributes
Name  Required  Type  Default  Description  

algorithm  No  String  The algorithm to use to encrypt the string. * 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) FIPS197. * BLOWFISH: the Blowfish algorithm defined by Bruce Schneier. * DES: the Data Encryption Standard algorithm defined by NIST FIPS463. * DESEDE: the "Triple DES" algorithm defined by NIST FIPS463.  
encoding  No  String  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 AF and 09 represent the hexadecimal byte values. * UU: the UNIX standard UUEncode algorithm (default). If you specify this parameter, you must also specify the algorithm parameter.  
4

iterations  No  Numeric  The number of iterations to transform the password into a binary key. Specify this parameter to adjust ColdFusion encryption to match the details of other encryption software. If you specify this parameter, you must also specify the algorithm parameter with a Password Based Encryption (PBE) algorithm. Do not specify this parameter for Block Encryption Algorithms. You must use the same value to encrypt and decrypt the data. * For Password Based Encryption Algorithms: This is the binary Salt value to transform the password into a key.  
4

ivorsalt  No  Binary  Specify this parameter to adjust ColdFusion encryption to match the details of other encryption software. If you specify this parameter, you must also specify the algorithm parameter. * For Block Encryption Algorithms: This is the binary Initialization Vector value to use with the algorithm. The algorithm must contain a Feedback Mode other than ECB. This must be a binary value that is exactly the same size as the algorithm block size. * For Password Based Encryption Algorithms: This is the binary Salt value to transform the password into a key.  
key  Yes  String  Key or seed used to encrypt the string. * For the CFMX_COMPAT algorithm, any combination of any number of characters; used as a seed used to generate a 32bit encryption key. * For all other algorithms, a key in the format used by the algorithm. For these algorithms, use the GenerateSecretKey function to generate the key.  
String  Yes  String  String to encrypt. 