I am working on decrypting a password reading from a table which was decrypted manually using the cryptography.fernet
class in Python
manually encrypting the password :
key = Fernet.generate_key()
f = Fernet(key)
eencrypted_passwd = f.encrypt("password".encode('utf-8'))```
output :
b'gAAAAABeiTIiONj5c2Tyj1xDaoCLfK9_RJEqzdnuJyw_JO3AduywKhygNFYk1_a_srEgNvHB__vpcL-CElWROExQnwJHaydAmQ=='
the output value was stored in a table.
I am trying to decrypt the same value after reading from table but I am getting a blank error :
decrypted_password = f.decrypt(password_encrypted_value_read_from_database)
can someone please suggest ?