mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] uses hmac_sha512 for hasing the token and don't store the key in it anymore
This commit is contained in:
parent
fc52f05459
commit
886bec89ec
1 changed files with 10 additions and 0 deletions
10
hmac_sha512.py
Normal file
10
hmac_sha512.py
Normal 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()
|
Loading…
Add table
Reference in a new issue