Decrypt(encrypted_string, seed)
| Parameter |
Description |
|---|---|
| encrypted_string |
String to decrypt |
| seed |
String that specifies the seed used to generate the 32-bit key |
<!--- This example shows the use of Encrypt and Decrypt --->
<html>
<head>
<title>Decrypt Example</title>
</head>
<body bgcolor = silver>
<H3>Decrypt Example</H3>
<P>This function allows for the encryption and decryption of a
string. Try it by entering a string and a key and seeing the results.
<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" method = "post">
<P>Input your key:
<P><input type = "Text" name = "myKey" value = "foobar">
<P>Input your string to be encrypted:
<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>
</body>
</html>