Lucee Function Reference
decrypt()
Decrypts a string that is encrypted with the Encrypt function.
Example
decrypt(string encrypted_string,string key,[string algorithm,[string encoding,[any IVorSalt,[number iterations,[boolean precise]]]]]):string
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
encrypted_string | string | Yes | String to decrypt. | |
key | string | Yes |
Key or seed used to encrypt the string. |
|
algorithm | string | No | cfmx_compat |
The algorithm to use to decrypt the string. Must be the same as the algorithm used to encrypt the string. 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. |
encoding | string | No | uu |
The binary encoding used to represent the data as a string. Must be the same as the algorithm used to encrypt the string. |
IVorSalt | any | No | Initialization Vector for algorithms with Feedback Mode that is not ECB, or Salt for Password Based Encryption algorithms | |
iterations | number | No | number of Iterations for Password Based Encryption algorithms (ignored for all other algorithms). NIST recommends a minimum value of 1000. | |
precise | boolean | No | false | if set to true the input must follow the rule for that encoding a 100%, the decryptor will not try to interpret inputs that are not a 100% correct. This should be used to avoud false positives. |