Note on MySQL Encrypt/Decrypt
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 60808
interpreted = N
texte = A brief note on using encryption functions with WebDNA and mySQL. It's notimmediately obvious in the mySQL docs how to decrypt a column within theWebDNA setting. Or at least, it wasn't to me.;-) Here is a simple code example that brings back all of the columns for atable, including an AES encrypted column and actually works:[SQLExecute conn_ref=conn1&result_var=rs1]SELECT *,AES_DECRYPT({column_name},'{key}') AS {new_name} FROM {table_name}WHERE {column_name} = {value};[/SQLExecute]Everything within '{}' must be replaced with the appropriate element.The key finding is that you need to bring back the data with a column nameyou assign with the 'AS' clause.Being relatively new to mySQL, I would certainly appreciate any tips oramendments to this code from those more experienced.Christian F. GurneyManaging DirectorKG InterDev, LLCcfgurney@kginterdev.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
A brief note on using encryption functions with WebDNA and mySQL. It's notimmediately obvious in the mySQL docs how to decrypt a column within theWebDNA setting. Or at least, it wasn't to me.;-) Here is a simple code example that brings back all of the columns for atable, including an AES encrypted column and actually works:[SQLExecute conn_ref=conn1&result_var=rs1]SELECT *,AES_DECRYPT({column_name},'{key}') AS {new_name} FROM {table_name}WHERE {column_name} = {value};[/SQLExecute]Everything within '{}' must be replaced with the appropriate element.The key finding is that you need to bring back the data with a column nameyou assign with the 'AS' clause.Being relatively new to mySQL, I would certainly appreciate any tips oramendments to this code from those more experienced.Christian F. GurneyManaging DirectorKG InterDev, LLCcfgurney@kginterdev.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Christian F. Gurney"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Searching for the end (1998)
WC TableGrinder (1997)
Webcat no longer supported? (2006)
WCf2 and nested tags (1997)
Search Question (2003)
Big Databases (1997)
Forms Search Questions (1997)
WebCat for mass emailings (1997)
Tax Rate (2000)
Further tests with the infamous shipCost (1997)
File Upload (1997)
error (2000)
Showif, Hideif reverse logic ? (1997)
[WebDNA] multi hyperlinks in text paragraphs (2014)
Internet Explorer and caching (2000)
foreign languages, email, webcat (1998)
WebMerchant still not working!! (1999)
ShowNext (1997)
creating a ShipCosts database (1997)
Not really WebCat (1997)