|
Yep, Simply call the function with the password and key to encrypt and then send it again with the encrypted value and the same key to see the password.
Note,
if you are using this for password storage, Id be careful.
I personally think "hashing" a password is better as its only one way .
If someone got your DB and the Key, They would have ALL passwords.
With a hash, this wouldn't happen.
Rainbow table lookups can be slow and if you use a SALT and ensure users use string passwords there is no way to even use a rainbow lookup.
|