It depends on what you mean by safe. I just wrote a simple script that uses
URLEncodedFormat to create a safe version for a hidden for field.

<CFSET S = "Raymond Camden's middle name is Kenneth.">
<CFSET KEY = "rlkghsdfhg50238708923iflk">
<CFSET ENC = Encrypt(S,KEY)>

<CFIF IsDefined("Form.pword")>
        decrypting... <CFOUTPUT>#Decrypt(URLDecode(Form.pword),Key)#</CFOUTPUT><P>
</CFIF>

<FORM ACTION="enc.cfm" METHOD="Post">

<CFOUTPUT><INPUT TYPE="hidden" NAME="pword"
VALUE="#URLEncodedFormat(ENC)#"></CFOUTPUT>

<INPUT TYPE="Submit">
</FORM>

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: Mahmut Basaran [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 8:54 AM
> To: CF-Talk
> Subject: Re: Encryption differences in ColdFusion 4.5 and 5.0?
>
>
> Hello
>
> >> safe characters...
>
> I sometimes have problems with the encrypt functions. Can someone point me
> "where can I learn the safe characters"?
>
> thanks,
> Mahmut
>
> ----- Original Message -----
> From: "Raymond Camden" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 28, 2001 3:32 PM
> Subject: RE: Encryption differences in ColdFusion 4.5 and 5.0?
>
>
> > > > it is a mistake to use unofficial functions
> > >
> > >
> > > So what's a developer to do if the "official" function is known to
> produce
> > > unpredictable results that breaks applications and the
> > > "unofficial" function
> > > produces predictable, useful results?
> >
> > Report it, there are multiple ways of doing that. The best way
> is via tech
> > support, or via the Forums. As for this case, I'm looking into it myself
> to
> > see if I can recreate the bug. So far, I've mainly heard that
> the _output_
> > from the functions are a bit odd, but not wrong, per se. Tyson
> said, "The
> > issue with the out-of-the-box ColdFusion encrypt/decrypt functions is
> > that it doesn't limit itself to "safe" characters when doing the
> > encrypting." and I think again the point is what is meant by "safe"
> > characters. Jon Hall pointed out a method to make the string db safe.
> >
> > -Ray (who just happens to work for Macromedia, but doesn't speak for em,
> > blah blah blah ;)
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to