From 79ed20bbf7fc959130a8924b159970e6f5de879d Mon Sep 17 00:00:00 2001 From: StNicolay <103897650+StNicolay@users.noreply.github.com> Date: Wed, 5 Oct 2022 18:37:19 +0300 Subject: [PATCH] Added func to hash master pass with known hasg --- src/cryptography/master_pass.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cryptography/master_pass.py b/src/cryptography/master_pass.py index 61d8f91..0ac4087 100644 --- a/src/cryptography/master_pass.py +++ b/src/cryptography/master_pass.py @@ -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)