Select * when using AES_DECRYPT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • veg_all@yahoo.com

    #1

    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?

  • Jeff North

    #2
    Re: Select * when using AES_DECRYPT

    On 18 Jul 2006 21:42:49 -0700, in mailing.databas e.mysql
    veg_all@yahoo.c om
    <1153284169.898 914.168450@i42g 2000cwa.googleg roups.comwrote:
    >| 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 @key='thisisthe secretkey';
    select AES_DECRYPT(col umn1, @key), AES_DECRYPT(col umn2,@key),
    AES_DECRYPT(col umn3_etc...,@ke y)
    ---------------------------------------------------------------
    jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
    ---------------------------------------------------------------

    Comment

    Working...