Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
from cryptography.fernet import Fernet
key = Fernet.generate_key()
print(key.decode())

Key stored in a file

This is very similar to the previous approach but the encryption key is stored in a file instead of an environment variable. For this to work you set SQ_ENCRYPTION_KEY_FILE environment variable to the (absolute) path of a file containing nothing but the encryption key.

...