diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..921c204 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# Python +__pycache__/ +*.py[cod] +*.pyo +*.pyd +.Python + +# Virtual environments +.venv/ +venv/ +env/ + +# Data directory (runtime files, not source) +data/ + +# Distribution / packaging +*.egg-info/ +dist/ +build/ diff --git a/modules/config.py b/modules/config.py index 1f11140..3edd308 100644 --- a/modules/config.py +++ b/modules/config.py @@ -48,13 +48,11 @@ class ConfigError(Exception): # --------------------------------------------------------------------------- def _encrypt(plaintext: str, passphrase: str) -> bytes: - identity = pyrage.passphrase.Recipient(passphrase) - return pyrage.encrypt(plaintext.encode(), [identity]) + return pyrage.passphrase.encrypt(plaintext.encode(), passphrase) def _decrypt(ciphertext: bytes, passphrase: str) -> str: - identity = pyrage.passphrase.Identity(passphrase) - return pyrage.decrypt(ciphertext, [identity]).decode() + return pyrage.passphrase.decrypt(ciphertext, passphrase).decode() # ---------------------------------------------------------------------------