Encrypts 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.
Returns: string
Usage
Encrypt( string, key [, algorithm [, encoding [, IVorSalt [, iterations ] ] ] ] )
Arguments
Argument 
Description 
Default 
string
_{(string, required)}

String to encrypt.


key
_{(string, required)}

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.


algorithm
_{(string, optional)}

The algorithm to use to decrypt the string. Must be the same as the algorithm used to encrypt the string.  CFMX_COMPAT(default): the CFML specific algorithm. This algorithm is the least secure option  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 You may also specify other algorithm names as well as the feedback mode and padding scheme where applicable (in the format algorithm/mode/padding) as documented in the Java Cryptography Architecture (JCA) Reference Guide.

cfmx_compat

encoding
_{(string, optional)}

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(default): the UNIX standard UUEncode algorithm .

uu

IVorSalt
_{(any, optional)}

Initialization Vector for algorithms with Feedback Mode that is not ECB, or Salt for Password Based Encryption algorithms


iterations
_{(number, optional)}

number of Iterations for Password Based Encryption algorithms (ignored for all other algorithms). NIST recommends a minimum value of 1000.


Examples
There are currently no examples for this function.