I need a way to store sensitive data in a database, and be able to decrypt it later. I can't think of a solution, nothing like base64 would do it, even with a salt, I can't use a one-way hash, because I need to view the data later.
The site is designed so the user to logs in, then they have access to the data, but with symmetric encryption, the user would need to input a password every time he/she wanted to view data, or have the password stored in a session/cookie, but that seems a little too insecure. Something like RSA might work, but where would I store the private key?
Any ideas on how to store this data would be great,