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:
@@ -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