Skip to content

Instantly share code, notes, and snippets.

@KolevDarko
Created June 16, 2017 08:01
Show Gist options
  • Save KolevDarko/13efde1097f0a53f78d8ac0cfc075612 to your computer and use it in GitHub Desktop.
Save KolevDarko/13efde1097f0a53f78d8ac0cfc075612 to your computer and use it in GitHub Desktop.
def create_signature():
ts = str(int(time.time()))
sig = str(ts + "." + public_key).encode()
sign = hmac.new(secret_key.encode(), sig, digestmod=sha256).hexdigest()
signature = "{0}.{1}.{2}".format(ts, public_key, sign)
return signature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment