Skip to content

Commit

Permalink
Improve docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed Nov 11, 2024
1 parent 5f5d964 commit 69b165b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/backup_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ class RestoreBackupFileContent:


def password_to_key(password: str) -> bytes:
"""Generate a AES Key from password."""
"""Generate a AES Key from password.
Matches the implementation in supervisor.backups.utils.password_to_key.
"""
key: bytes = password.encode()
for _ in range(100):
key = hashlib.sha256(key).digest()
Expand Down

0 comments on commit 69b165b

Please sign in to comment.