mirror of
https://github.com/SantaSpeen/winConnect.git
synced 2025-07-03 00:17:16 +00:00
[-] WinConnectCryptoCert
This commit is contained in:
parent
68724650d2
commit
038a3837fb
@ -4,5 +4,5 @@ from .crypto_classes import (
|
|||||||
WinConnectCryptoNone,
|
WinConnectCryptoNone,
|
||||||
WinConnectCryptoSimple,
|
WinConnectCryptoSimple,
|
||||||
WinConnectCryptoPassword,
|
WinConnectCryptoPassword,
|
||||||
WinConnectCryptoCert
|
# WinConnectCryptoCert
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user