From 886bec89ec66fa9d1bf6d77c688a624ea752c649 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 15 May 2017 03:52:53 +0200 Subject: [PATCH 1/2] [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() From 0ef02dcce49d0bd5f8501b4510cbb009711df2ed Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 15 May 2017 20:57:23 +0200 Subject: [PATCH 2/2] [mod] remove python script and talk directly to openssl --- hmac_sha512.py | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 hmac_sha512.py diff --git a/hmac_sha512.py b/hmac_sha512.py deleted file mode 100644 index d45c510..0000000 --- a/hmac_sha512.py +++ /dev/null @@ -1,10 +0,0 @@ -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()