diff --git a/src/cryptography/master_pass.py b/src/cryptography/master_pass.py new file mode 100644 index 0000000..61d8f91 --- /dev/null +++ b/src/cryptography/master_pass.py @@ -0,0 +1,10 @@ +import bcrypt + +print("Hi") + + +def encrypt_master_pass(passwd: str) -> tuple[bytes, bytes]: + """Hashes master password and return tuple of hashed password and salt""" + salt = bcrypt.gensalt() + hashed = bcrypt.hashpw(passwd.encode("utf-8"), salt) + return (hashed, salt)