mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-18 12:09:12 +00:00
tests: use AES-GCM key generation
This commit is contained in:
@@ -3,7 +3,8 @@ from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
import asyncio
|
||||
import gzip
|
||||
from cryptography.fernet import Fernet
|
||||
import os
|
||||
import base64
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parents[1]))
|
||||
|
||||
@@ -61,7 +62,7 @@ class MockClient:
|
||||
|
||||
|
||||
def setup_client(tmp_path, server):
|
||||
key = Fernet.generate_key()
|
||||
key = base64.urlsafe_b64encode(os.urandom(32))
|
||||
enc_mgr = EncryptionManager(key, tmp_path)
|
||||
|
||||
with patch("nostr.client.Client", lambda signer: MockClient(server)), patch(
|
||||
|
Reference in New Issue
Block a user