Thread: AES Encryption
View Single Post
  #1 (permalink)  
Old 08-08-2012, 08:58 AM
jimbo
Guest
 
Posts: n/a
Default AES Encryption

Hi,

I am having a nightmare with mySQL AES_DECRYPT.

I can enrypt things fine, but how do you decrypt a column? For example, I write this line:

insert into tblTest (TestColumn) VALUES (AES_ENCRYPT('testworks','encryptkey'))

which happily inserts "testworks" in encrypted format

When I then try and use:

SELECT TestColumn, AES_DECRYPT(tblTest.TestColumn,'encryptkey') FROM tblTest;

The decrypted column is just nulls. I've been reading google for ages, but I just can't make it work

Any help would be great,

Thanks
James
Reply With Quote