mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 14:44:21 +01:00
Removes hash/cipher configuration and changes AESGCM128 for CHACHA20POLY1305
Updates tests accordingly
This commit is contained in:
@@ -1,20 +1,5 @@
|
||||
from pisa.conf import SUPPORTED_CIPHERS, SUPPORTED_HASH_FUNCTIONS
|
||||
|
||||
|
||||
class EncryptedBlob:
|
||||
def __init__(self, data, cipher="AES-GCM-128", hash_function="SHA256"):
|
||||
if cipher in SUPPORTED_CIPHERS:
|
||||
self.cipher = cipher
|
||||
|
||||
else:
|
||||
raise ValueError("Cipher not supported")
|
||||
|
||||
if hash_function in SUPPORTED_HASH_FUNCTIONS:
|
||||
self.hash_function = hash_function
|
||||
|
||||
else:
|
||||
raise ValueError("Hash function not supported")
|
||||
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __eq__(self, other):
|
||||
|
||||
Reference in New Issue
Block a user