1from cryptography.fernet import Fernet
2message = "my deep dark secret".encode()
3
4f = Fernet(key)
5encrypted = f.encrypt(message)
6
1# encrypting
2from cryptography.fernet import Fernet
3message = "my deep dark secret".encode()
4
5f = Fernet(key)
6encrypted = f.encrypt(message)
7# decrypting
8from cryptography.fernet import Fernet
9encrypted = b"...encrypted bytes..."
10
11f = Fernet(key)
12decrypted = f.decrypt(encrypted)