Skip to content

Instantly share code, notes, and snippets.

@YiLi225
Last active February 26, 2023 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YiLi225/f995fc306524d2366e28735775ebfe1c to your computer and use it in GitHub Desktop.
Save YiLi225/f995fc306524d2366e28735775ebfe1c to your computer and use it in GitHub Desktop.
from google.colab import files
uploaded = files.upload()
!pip install cryptography
from cryptography.fernet import Fernet
## Generate Fernet keys
key = Fernet.generate_key()
# string the key in a file
with open('filekey.key', 'wb') as filekey:
filekey.write(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment