pythonencryptionfernet

choosing Fernet encryption algorithm


I'm using Fernet, and confused with cipher algorithms.. how can i try AES, DES, Twofish, RC4 or other algorithms while generating my key. (sorry if messed up:| just new to cipher :)

>>> from cryptography.fernet import Fernet
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
>>> token = f.encrypt(b"my deep dark secret")
>>> token
b'...'
>>> f.decrypt(token)
b'my deep dark secret'

Solution

  • you can not use other encryption algorithms with Fernet as in Fernet Dosc says, you can only AES.