Select * when using AES_DECRYPT
If all my columns are encrypted, is it true that I can not use a simple
'select * from' anymore. Instead I need to do:
select AES_DECRYPT( column1 , 'mykey' ), AES_DECRYPT( column2 ,
'mykey' ),
AES_DECRYPT( column3_etc... , 'mykey' )
This would make my code rather long . Is there a shortcut I am missing?
Re: Select * when using AES_DECRYPT
On 18 Jul 2006 21:42:49 -0700, in mailing.database.mysql
veg_all [at] yahoo.com
<1153284169.898914.168450 [at] i42g2000cwa.googlegroups.com> wrote:
>| If all my columns are encrypted, is it true that I can not use a simple
>| 'select * from' anymore. Instead I need to do:
>|
>| select AES_DECRYPT( column1 , 'mykey' ), AES_DECRYPT( column2 ,
>| 'mykey' ),
>| AES_DECRYPT( column3_etc... , 'mykey' )
>|
>| This would make my code rather long . Is there a shortcut I am missing?
Perhaps:
SET [at] key='thisisthesecretkey';
select AES_DECRYPT(column1, [at] key), AES_DECRYPT(column2, [at] key),
AES_DECRYPT(column3_etc..., [at] key)
------------------------------------------------------------ ---
jnorthau [at] yourpantsyahoo.com.au : Remove your pants to reply
------------------------------------------------------------ ---