[fix] uses hmac_sha512 for hasing the token and don't store the key in it anymore

This commit is contained in:
Laurent Peuch 2017-05-15 03:52:53 +02:00 committed by Weblate
parent fc52f05459
commit 886bec89ec

10
hmac_sha512.py Normal file
View file

@ -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()