Decrypt - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Decrypt

Description
Decrypts a string that is encrypted with the
Returns
String, unencrypted.
Category
Other
functions,
Function syntax
Decrypt(encrypted_string, seed)
See also
Duplicate,
Encrypt
Parameters
Parameter
encrypted_string
seed
Example
<!--- This example shows the use of Encrypt and Decrypt --->
<h3>Decrypt Example</h3>
<p>This function encrypts/decrypts a string. Enter a string and a key.
<cfif IsDefined("FORM.myString")>
<cfset string = FORM.myString>
<cfset key = FORM.myKey>
<cfset encrypted = encrypt(string, key)>
<cfset decrypted = decrypt(encrypted, key)>
<cfoutput>
<h4><B>The string:</B></h4> #string# <br>
<h4><B>The key:</B></h4> #key#<br>
<h4><B>Encrypted:</B></h4> #encrypted#<br>
<h4><B>Decrypted:</B></h4> #decrypted#<br>
</cfoutput>
</cfif>
<form action = "encrypt.cfm">
<p>Input your key:
<p><input type = "Text" name = "myKey" value = "foobar">
<p>Enter string to encrypt:
<p><textArea name = "myString" cols = "40" rows = "5" WRAP = "VIRTUAL">
This string will be encrypted (try typing some more)</textArea>
<input type = "Submit" value = "Encrypt my String">
</form>
462
Chapter 3: ColdFusion Functions
String functions
Description
String or a variable that contains one. String to decrypt
String. The 32-bit key that was used to encrypt the string.
function.
Encrypt

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents