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.