Introduction to User password encryption

Source: Internet
Author: User

Most developers use a database to store passwords, and if passwords are stored directly in plaintext in the database, the system is insecure. The hashing algorithm can be used to solve this problem.

Hashing is a one-way algorithm, once the data is caught, it will no longer get its original value, you can use the hashing algorithm to encrypt the password, and then store it in the database. After the user enters the password, it can be converted again using the hash algorithm and then compared to the hash stored in the database.

One of the characteristics of hashing is that even if the original data only a small change, the data hash will also have a very large change, Rickie and Ricky the two words very similar, but the hash algorithm after the encryption results are very different, you may not see the similarities between the two. Developers can use a variety of hashing algorithm classes. The most commonly used are SHA1 and MD5.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.