338
CFML Language Reference
Decrypt
Decrypts an encrypted string.
See also
Encrypt
.
Syntax
Decrypt
(
encrypted_string, key)
encrypted_string
String to be decrypted.
key
String specifying the key used to encrypt encrypted_string.
Examples
<!--- 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 out by entering your own string and a key of your
own choosing 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>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...