Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the encryption functions in MySQL

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about the encryption functions in MySQL. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

MySQL's encryption function (transferred) [@ more@] PASSWORD (): creates an encrypted password string suitable for inserting into the security department of MySQL

Tong. The encryption process is irreversible and uses a different algorithm than the unix password encryption process. It is mainly used in MySQL authentication system.

ENCRYPT (,): encrypts a string using the UNIX crypt () system, and the ENCRYPT () function receives the string to be encrypted and (optional) salt for the encryption process (a string that uniquely determines the password, just like the key). Note that it is not supported on windows

ENCODE (,) DECODE (,): encrypts and decrypts the string. This function takes two parameters: the string that is encrypted or decrypted and the key that serves as the basis for encryption or decryption. The Encode result is a binary string stored as a BLOB type. Encryption in Chengdu is relatively weak.

MD5 (): calculates the MD5 checksum of a string (128bit)

SHA5 (): calculates the SHA5 checksum of a string (160bits)

The checksum returned by the above two functions is hexadecimal, which is suitable for the password used in the authentication system.

Eg:SELECT * FROM USERS WHERE NAME='JOHN' AND PASSWORD=MD5 ('MYPASS')

These are the encryption functions in the MySQL shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report