Created
June 16, 2017 08:01
-
-
Save KolevDarko/13efde1097f0a53f78d8ac0cfc075612 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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