[-] WinConnectCryptoCert

This commit is contained in:
SantaSpeen committed 2025-03-13 19:52:59 +03:00
1 parent 68724650d2
commit 038a3837fb
2 files changed
+19 -19

No files matched your search

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