mysql: encrypting and decrypting data

Posted by cbrulak on Stack Overflow See other posts from Stack Overflow or by cbrulak
Published on 2010-04-01T05:08:13Z Indexed on 2010/04/01 5:13 UTC
Read the original article Hit count: 350

Filed under:
|

Does mysql provide a mechanism for storing and retrieving encrypted data? I don't mean passwords, I mean real strings.

I'd like to encrypt a string, store in mysql and then retrieve the decrypted string at a later date.

So, I know there is the AES_Encrypt and decrypt functions. But they ask for a key. (which is fine) but I wondering if you call those functions and use your user password as the key. Or something else that is super-simple.

Also, is there a simple wrapper for the AES_Encrypt & decrypt functions in Rails? Or do you need to build the query manually?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about encryption