[-] WinConnectCryptoCert

This commit is contained in:
Maxim Khomutov 2025-03-13 19:52:59 +03:00
parent 68724650d2
commit 038a3837fb
2 changed files with 19 additions and 19 deletions

View File

@ -4,5 +4,5 @@ from .crypto_classes import (
WinConnectCryptoNone,
WinConnectCryptoSimple,
WinConnectCryptoPassword,
WinConnectCryptoCert
# WinConnectCryptoCert
)

View File

@ -88,21 +88,21 @@ class WinConnectCryptoPassword(WinConnectCryptoBase):
pad_len = decrypted[-1] # Убираем PKCS7 padding
return decrypted[:-pad_len]
class WinConnectCryptoCert(WinConnectCryptoBase):
def __init__(self, cert_file: str):
if not _pip_crypto:
raise ImportError("Crypto library not installed. Install with 'pip install winConnect[crypto]'")
self.cert_file = Path(cert_file)
def _open_cert(self):
pass
def load(self) -> None:
self._open_cert()
def encrypt(self, data: bytes) -> bytes:
pass
def decrypt(self, data: bytes) -> bytes:
pass
# class WinConnectCryptoCert(WinConnectCryptoBase):
# def __init__(self, cert_file: str):
# if not _pip_crypto:
# raise ImportError("Crypto library not installed. Install with 'pip install winConnect[crypto]'")
# self.cert_file = Path(cert_file)
#
# def _open_cert(self):
# pass
#
# def load(self) -> None:
# self._open_cert()
#
# def encrypt(self, data: bytes) -> bytes:
# pass
#
# def decrypt(self, data: bytes) -> bytes:
# pass
#