Hey Ray,

Search on Allaire's forums for "encrypt" and "different" and you get a
few threads.

However, I went and re-read them and it seems that it's the usage of the
function which was producing inconsistent results. Encrypting with
cf_encrypt will produce some random characters at the end of the string
and if comparing using a where clause as in:

where cf_encrpyt(form.password, key) =
cf_decrypt(recordset.password,key)

it will fail because of these random characters. However, you can always
decrypt using cf_decrypt without problems.

Another problem which arose were some strange ascii characters output by
cf_encrypt. These caused some folks problems when storing them in a
database. A solution was to either URLDe/Encode the results or use a
Base64 function.

So, although the encrypted strings are different, it's just the
functionality of the function and it can be worked around. What's great
about cfusion_encrypt is that it's just a string of numbers and no funky
high ascii gibberish. But if I'm going to be looking at problems like
Ray's having down the road, I'm going to change my code now!

-Tim


----- Original Message -----
From: "Raymond Camden" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 4:06 PM
Subject: RE: Encryption differences in ColdFusion 4.5 and 5.0?


> I'm not saying you're wrong, but I'd like to see an example where
encrypt
> produces inconsistent results.
>
>
=======================================================================
> 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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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