What are the parameters of the key? Min/max length? characters?
-----Original Message----- From: Brian Scandale [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 1:30 PM To: CF-Talk Subject: Re: CF encrypt() and SQL I don't remember where I got this... some generous person on this list perhaps, but I have been using it with much success. ENCRYPT: <cfset encrypted=encrypt(form.pwd,"key")> <cfset encrypted=tobase64(encrypted)> store in database DECRYPT: query database <cfset decrypted=tobinary(qResults.pwd)> <cfset decrypted=tostring(decrypted)> <cfoutput>#decrypt(decrypted,'key')#</cfoutput> At 10:26 AM 9/10/02, you wrote: >Ok here's what's going on: > >I'm using the encrypt() function to encrypt data as it goes into my >database. > >Like this: > ><cfquery datasource="#application.dsn#" name="insertencrypteddata"> >UPDATE mytable >SET myvalue= '#encrypt("#FORM.myvalue#","mykey")#' >WHERE id = #FORM.id" ></cfquery> > >Some of you probably already know what my problem is. Sometimes this >works fine. Other times the encrypted values have characters in them >that (like single-quote) that break my query. Anybody been through >this? Solutions? > >Thanks in advance > >Willy > > > > >----- >Willy Ray >Web Applications Developer >Certified Advanced ColdFusion Developer >Westminster College > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists