From 886bec89ec66fa9d1bf6d77c688a624ea752c649 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 15 May 2017 03:52:53 +0200 Subject: [PATCH] [fix] uses hmac_sha512 for hasing the token and don't store the key in it anymore --- hmac_sha512.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 hmac_sha512.py diff --git a/hmac_sha512.py b/hmac_sha512.py new file mode 100644 index 0000000..d45c510 --- /dev/null +++ b/hmac_sha512.py @@ -0,0 +1,10 @@ +import sys +import hashlib +import hmac + +key = sys.argv[1] +message = sys.argv[2] + +result = hmac.new(key, digestmod=hashlib.sha512) +result.update(message) +print result.hexdigest()