php aes_encrypt

时间:2011-08-05 11:49:03

标签: php mysql encryption

我有一个问题:

Insert into user2 (User_Email,User_Password)Values(AES_ENCRYPT('$email','$this->seed'),AES_ENCRYPT('$password','$this->seed

Select AES_DECRYPT('User_Email','$this->seed') as Email, AES_DECRYPT('User_Password','$this->seed') as Password from user2 where User_ID =$id

The table is Innodb
The columns are varbinary(200)
The key is private $seed = 'YourTheBestYourTheBesYourTheBes';

我在数据库中有这个:电子邮件:E -?Y ? c 密码:2cc37143d1cf0bc9eade4e87121f458e6866dcc0218041bc1a932caf78628b24

我的参数是$ U-> NewUser('XXXXX @ gmail.com','Mypassword');我改变了这些

我的问题是我为返回值返回NULL并且不确定原因。

0 个答案:

没有答案
相关问题