PHP 2-way encryption: I need to store passwords that can be retrieved
Posted
by
gAMBOOKa
on Stack Overflow
See other posts from Stack Overflow
or by gAMBOOKa
Published on 2011-02-23T10:48:00Z
Indexed on
2011/02/25
23:25 UTC
Read the original article
Hit count: 217
I am creating an application that will store passwords, which the user can retrieve and see. The passwords are for a hardware device, so checking against hashes are out of the question.
What I need to know is:
How do I encrypt and decrypt a password in PHP?
What is the safest algorithm to encrypt the passwords with?
Where do I store the private key?
Instead of storing the private key, is it a good idea to require users to enter the private key any time they need a password decrypted? (Users of this application can be trusted)
In what ways can the password be stolen and decrypted? What do I need to be aware of?
© Stack Overflow or respective owner