c,python: Change the algorithm for hashing the master password to Argon2

This commit is contained in:
2021-11-14 09:59:51 +01:00
parent c869c79619
commit cc473f4c24
4 changed files with 21 additions and 10 deletions

View File

@ -3,7 +3,6 @@
#
import argon2
import argparse
import hashlib
import re
from . import bhash, phogen
@ -33,7 +32,7 @@ class PassgenyInvalidPattern(Exception):
class Passgeny:
def __init__(self, master_password):
self.master_password = hashlib.sha256(master_password.encode()).digest()
self.master_password = self.__argon2_hash(master_password.encode())
self.pattern = PASSGENY_DEFAULT_PATTERN
def generate(self, domain, user, *tokens):