1

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 ?

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Imran
  • 121
  • 4
  • 9

1 Answers1

0

I was able to take care of above by using jasypt4py library from git : https://github.com/fareliner/jasypt4py

Imran
  • 121
  • 4
  • 9