diff --git a/src/cryptography/other_accounts.py b/src/cryptography/other_accounts.py index e0f6fd5..ed9368c 100644 --- a/src/cryptography/other_accounts.py +++ b/src/cryptography/other_accounts.py @@ -23,8 +23,8 @@ def _generate_key(salt: bytes, master_pass: bytes) -> bytes: def encrypt_account_info( login: str, passwd: str, master_pass: bytes ) -> tuple[bytes, bytes, bytes]: - """Encrypts login and password of a user using hash of their master password as a key. - Returns a tuple of encrypted login password and salt""" + """Encrypts login and password of a user using their master password as a key. + Returns a tuple of encrypted login, password and salt""" salt = bcrypt.gensalt() key = _generate_key(salt, master_pass) f = Fernet(key) @@ -36,6 +36,8 @@ def encrypt_account_info( def decrypt_account_info( enc_login: bytes, enc_pass: bytes, master_pass: bytes, salt: bytes ) -> tuple[str, str]: + """Decrypts login and password using their master password as a key. + Returns a tuple of decrypted login and password""" key = _generate_key(salt, master_pass) f = Fernet(key) login_bytes = f.decrypt(enc_login)