From 39846a95f26ba01a8b3cdaf7bbfa294b9cf46a31 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Mar 2026 21:39:49 +0000 Subject: [PATCH] Fix pyrage passphrase API for v1.3.0 pyrage 1.3.0 removed the Recipient/Identity class pattern in favour of pyrage.passphrase.encrypt(plaintext, passphrase) and pyrage.passphrase.decrypt(ciphertext, passphrase) top-level functions. Update _encrypt/_decrypt in config.py accordingly. https://claude.ai/code/session_01KjaNo9RXevw6x1DjJD8mj6 --- modules/config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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() # ---------------------------------------------------------------------------