mirror of
https://github.com/gryf/softtoken.git
synced 2026-10-08 15:52:30 +02: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:
1 parent
9bc5020cd8
commit
d055730b9f
1 file changed
+1
-1
@@ -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':
|
||||
|
||||
Reference in new issue
Block a user