Home > Database > Mysql Tutorial > mysql functions about encryption and decryption

mysql functions about encryption and decryption

一个新手
Release: 2017-10-17 10:13:33
Original
2748 people have browsed it

Mysql function

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template