Name

Decrypt

Synopsis

                  
                  Decrypt(encryptedstring, key)

Decrypts encryptedstring using key. This function is designed to decrypt strings encrypted with the Encrypt( ) function. The following example takes an encrypted string and decrypts it:

<cfset MyString = "This is the secret message.">
<cfset MyKey = "1a2">
<cfset EncryptedString = Encrypt(MyString, MyKey)>
<cfset DecryptedString = Decrypt(EncryptedString, MyKey)>
   
<cfoutput>
<b>Original String:</b> #MyString#<br>
<b>Key:</b> #MyKey#
<p><b>Encrypted String:</b> #EncryptedString#<br> 
<b>Decrypted String:</b> #DecryptedString#
</cfoutput>

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.