Skip to content

Instantly share code, notes, and snippets.



Created Sep 17, 2013
What would you like to do?
256 bit key generate example
import random
import hashlib
import base64
base64.b64encode(hashlib.sha256( str(random.getrandbits(256)) ).digest(), random.choice(['rA','aZ','gQ','hH','hG','aR','DD'])).rstrip('==')

This comment has been minimized.

Copy link

@davidyen1124 davidyen1124 commented Sep 17, 2013

Good one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment