1from cryptography.fernet import Fernet
2message = "my deep dark secret".encode()
3
4f = Fernet(key)
5encrypted = f.encrypt(message)
6
1def load_key():
2 """
3 Loads the key named `secret.key` from the current directory.
4 """
5 return open("secret.key", "rb").read()
6