Password encryption

I saved the user passwords in an encrypted format in my database. However, now when the user wants to log in and tries to place his original password, the code always compares the entered (original) password with the encrypted version stored in the database, which leads to an unsuccessful login.

Please tell me how to compare the entered (original) password with the encrypted password stored in the database.

0
source share
6 answers

You should almost certainly have a password hash , rather than using reversible encryption. You may need to do this with salt ... in this case the correct steps are:

  • , ( ).
  • , , .
  • - , ( ) .

, , , , .

+8

! hash it (MD5/SHA1/bcrypt) -, - , .

+3

, .

+1
source

obviously he is failing. You must encrypt the original password every time you want to check the availability of the database.

+1
source

If you need a dynamic password to create java, every time it is dynamically generated,

Link

http://brigitzblog.blogspot.com/2011/11/java-dynamic-password-generation.html

0
source

You need to decrypt the saved password and check the equality with the entered password.

-1
source

All Articles