tests: use AES-GCM key generation

This commit is contained in:
thePR0M3TH3AN
2025-07-12 20:32:04 -04:00
parent f4a169ca80
commit f7c2017f1c
9 changed files with 31 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ import gzip
import uuid
import pytest
from cryptography.fernet import Fernet
import base64
sys.path.append(str(Path(__file__).resolve().parents[1]))
@@ -25,7 +25,9 @@ def test_nostr_publish_and_retrieve():
"abandon abandon abandon abandon about"
)
with TemporaryDirectory() as tmpdir:
enc_mgr = EncryptionManager(Fernet.generate_key(), Path(tmpdir))
enc_mgr = EncryptionManager(
base64.urlsafe_b64encode(os.urandom(32)), Path(tmpdir)
)
with patch.object(enc_mgr, "decrypt_parent_seed", return_value=seed):
client = NostrClient(
enc_mgr,