diff --git a/QtPyNetwork/core/__init__.py b/QtPyNetwork/core/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/QtPyNetwork/core/crypto.py b/QtPyNetwork/core/crypto.py deleted file mode 100644 index a31e549..0000000 --- a/QtPyNetwork/core/crypto.py +++ /dev/null @@ -1,21 +0,0 @@ -from cryptography.fernet import Fernet, InvalidToken - - -def encrypt(message: bytes, key: bytes) -> bytes: - return Fernet(key).encrypt(message) - - -def decrypt(data: bytes, key: bytes) -> bytes: - return Fernet(key).decrypt(data) - - -def generate_key(): - return Fernet.generate_key() - - -def validate_key(key: bytes): - try: - Fernet._get_unverified_token_data(key) # noqa - return True - except InvalidToken: - return False