From d055730b9fa675530c57e54e77545117c165831e Mon Sep 17 00:00:00 2001 From: Daniel Alvarez Date: Tue, 12 Jun 2018 09:29:38 +0200 Subject: [PATCH] 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. --- softtoken/softtoken.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softtoken/softtoken.py b/softtoken/softtoken.py index 7015253..64c4ead 100644 --- a/softtoken/softtoken.py +++ b/softtoken/softtoken.py @@ -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':