Skip to content

Instantly share code, notes, and snippets.

@kpx-dev
Created September 8, 2014 07:16
Show Gist options
  • Save kpx-dev/49c35ee8e4ca0f71d663 to your computer and use it in GitHub Desktop.
Save kpx-dev/49c35ee8e4ca0f71d663 to your computer and use it in GitHub Desktop.
import base64
import hashlib
import random
# generate random string length of 43
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