I'm studying pgcrypto and I'm interested in:
(crypt('123@', gen_salt('bf', 4)))
I can get a boolean value if I do:
SELECT * FROM user WHERE password = crypt('123@', password)
But if I want to decrypt the amount I entered in my bank? how do I do ?
I saw that we have the pgp_sym_encrypt() function
but this function needs a 'secret-key' to decrypt, I didn't find it that interesting
Is there a way to decrypt something that was generated by gen_salt?
You can try following code to encrypt and decrypt your data securely by using postgres pgcrypto extension;
Hope it works :)