1
0
mirror of https://github.com/gryf/softtoken.git synced 2025-12-20 21:08:05 +01:00

Fix bug with sha1 tokens

Previously, when a user wanted to generate an sha1 token, sha256
was used instead. This patch fixes the bug even though the use
of sha1 is discouraged.
This commit is contained in:
Daniel Alvarez
2018-06-12 09:29:38 +02:00
parent 9bc5020cd8
commit d055730b9f

View File

@@ -142,7 +142,7 @@ def main():
sys.exit(2)
if args.hash_function == 'sha1':
hf = hashlib.sha256
hf = hashlib.sha1
elif args.hash_function == 'sha256':
hf = hashlib.sha256
elif args.hash_function == 'sha512':