Skip to content

Instantly share code, notes, and snippets.

@Trshant
Created December 7, 2021 09:11
Show Gist options
  • Save Trshant/9766b714e6d0d5be4f11c764cf3766d2 to your computer and use it in GitHub Desktop.
Save Trshant/9766b714e6d0d5be4f11c764cf3766d2 to your computer and use it in GitHub Desktop.
# creating a secret key using random
import os
os.urandom(24)
# '\x17\x96e\x94]\xa0\xb8\x1e\x8b\xee\xdd\xe9\x91^\x9c\xda\x94\t\xe8S\xa1Oe_'
os.urandom(24).encode('hex')
# 'cd48e1c22de0961d5d1bfb14f8a66e006cfb1cfbf3f0c0f3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment