In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article uses easy-to-understand examples to introduce the encryption function of mysql database, the code is very detailed, interested friends can refer to, hope to be helpful to you.
The mysql encryption functions are:
1. AES_ENCRYPT (str,key): returns the result of encrypting the string str with the key key using the advanced encryption standard algorithm. The result of calling AES_ENCRYPT is a binary string stored as BLOB.
2. AES_DECRYPT (str,key): returns the result of decrypting the string str with the key key using the advanced encryption standard algorithm.
3. DECODE (str,key): decrypt the encrypted string str using key as the key.
4. ENCRYPT (str,salt): use the UNIXcrypt () function to encrypt the string str with the keyword salt (a string that uniquely determines the password, just like the key).
5. ENCODE (str,key): use key as the key to encrypt the string str, and the result of calling ENCODE () is a binary string that is stored as a BLOB type.
6. MD5 (): calculates the MD5 checksum of the string str.
7. PASSWORD (str): returns the encrypted version of the string str, which is irreversible and uses a different algorithm than the UNIX password encryption process.
8. SHA (): calculates the secure hash algorithm (SHA) checksum of the string str.
Example:
SELECT ENCRYPT ('root','salt'); SELECT ENCODE (' xufeng','key'); SELECT DECODE (ENCODE ('xufeng','key'),' key'); # encryption and decryption put together SELECT AES_ENCRYPT ('root','key'); SELECT AES_DECRYPT (AES_ENCRYPT (' root','key'), 'key'); SELECT MD5 (' 123456'); SELECT SHA ('123456') This is the end of the introduction of the encryption function of mysql database. I hope the above content can be of some help to you and can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.