Skip to content

Instantly share code, notes, and snippets.

@zyablitsev
Last active November 19, 2015 12:09
Show Gist options
  • Save zyablitsev/4770ff54d64cbf068931 to your computer and use it in GitHub Desktop.
Save zyablitsev/4770ff54d64cbf068931 to your computer and use it in GitHub Desktop.
Simple Key Generation in Python
# coding: utf-8
import base64
import hashlib
import random
base64.b64encode(hashlib.sha256( str(random.getrandbits(256)) ).digest(),
random.choice(['rA','aZ','gQ','hH','hG','aR','DD'])).rstrip('==')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment