Added func to hash master pass with known hasg

This commit is contained in:
StNicolay 2022-10-05 18:37:19 +03:00
parent 3cb9c74bac
commit 79ed20bbf7

View File

@ -8,3 +8,7 @@ def encrypt_master_pass(passwd: str) -> tuple[bytes, bytes]:
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(passwd.encode("utf-8"), salt)
return (hashed, salt)
def encrypt_master_pass_known_host(passwd: str, salt: bytes) -> bytes:
return bcrypt.hashpw(passwd.encode("utf-8"), salt)