Upfront, I would like to admit that I am a complete beginner in cryptography and password security. I am trying to store passwords in a babysat by ruby database. I understand that plaintext passwords must be added to a random “salt”, and this whole phrase must be hashed using some hashing algorithm such as:
Digest::SHA1.hexdigest(salt_plus_plainpassword)
As soon as this line is stored in the database, how to display it again to make sure that the user entered is correct if an unknown random salt is added to it?
source
share