MySQL Forums
Forum List  »  Security

Can't Get AES_ENCRYPT to work properly
Posted by: Jeremy Freedman
Date: March 14, 2011 04:43PM

I an trying to save credit card numbers using AES functions. When I tried a simple test it worked ok like SELECT AES_DECRYPT( AES_ENCRYPT('MEET' , $key) , $key) AS H , it gave H the initial value of 'MEET'

But when tried to use the same thing for the 16 digit Credit card field, it only stored junk like '!V' in the field then returned the same junk when I ran it through the decrypt on the SELECT end of it.
FYI
$key = "'124'"; using PHP
The field is varchar(128)

Options: ReplyQuote


Subject
Views
Written By
Posted
Can't Get AES_ENCRYPT to work properly
3996
March 14, 2011 04:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.