Home  >  Article  >  Database  >  mysql functions about encryption and decryption

mysql functions about encryption and decryption

一个新手
一个新手Original
2017-10-17 10:13:332738browse

Mysql function

select password(‘123456’); #加密密码
select md5(‘123456’); #md5加密密码(貌似mysql数据库相同密码每次加密后的md5字符串都是一样
select AES_ENCRYPT('123456','key') ; #加密
select AES_DECRYPT( ( select AES_ENCRYPT('123456','key') ),'key') ; #解密
select encode('123456','qwedgnkh'); #加密
select decode(encode ("'123456'","'qwedgnkh'"),"'qwedgnkh'") #解密

The above is the detailed content of mysql functions about encryption and decryption. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn