Merge pull request #2 from TySP-Dev/claude/create-data-directories-1ktvx

Initialise data directories, fix pyrage API, and add .gitignore
This commit is contained in:
Tyler
2026-03-24 17:42:04 -04:00
committed by GitHub
2 changed files with 21 additions and 4 deletions
+19
View File
@@ -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/
+2 -4
View File
@@ -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()
# ---------------------------------------------------------------------------