YOU WANT, NOT USUALLY!
What's the difference?
The difference is that hashing is a one-way function, where encryption is a two-way function.
So how do you know that the password is right?
Therefore, when a user submits a password, you do not decrypt your stored hash; instead, you perform the same bcrypt operation at the user input and compare the hashes. If they are identical, you accept authentication.
Should you use or encrypt passwords?
What you are doing now - password hashing - is correct. If you simply encrypt passwords, a breach of security in your application may allow an attacker to trivially learn all user passwords. If you use a hash (or better, salt and hash ), the user must crack passwords (which is expensive to calculate on bcrypt ) to get this knowledge.
Since your users are likely to use their passwords in several places, this will help protect them.
Glitch Desire Aug 6 '13 at 15:44 2013-08-06 15:44
source share