|
|
c722484 |
diff --git a/mycli/config.py b/mycli/config.py
|
|
|
c722484 |
index 5d71109..1626726 100644
|
|
|
c722484 |
--- a/mycli/config.py
|
|
|
c722484 |
+++ b/mycli/config.py
|
|
|
c722484 |
@@ -8,7 +8,7 @@ import sys
|
|
|
c722484 |
from typing import Union, IO
|
|
|
c722484 |
|
|
|
c722484 |
from configobj import ConfigObj, ConfigObjError
|
|
|
c722484 |
-import pyaes
|
|
|
c722484 |
+from Cryptodome.Cipher import AES
|
|
|
c722484 |
|
|
|
c722484 |
try:
|
|
|
c722484 |
import importlib.resources as resources
|
|
|
c722484 |
@@ -189,7 +189,7 @@ def encrypt_mylogin_cnf(plaintext: IO[str]):
|
|
|
c722484 |
return bytes(rkey)
|
|
|
c722484 |
|
|
|
c722484 |
def encode_line(plaintext, real_key, buf_len):
|
|
|
c722484 |
- aes = pyaes.AESModeOfOperationECB(real_key)
|
|
|
c722484 |
+ aes = AES.new(real_key, AES.MODE_ECB)
|
|
|
c722484 |
text_len = len(plaintext)
|
|
|
c722484 |
pad_len = buf_len - text_len
|
|
|
c722484 |
pad_chr = bytes(chr(pad_len), "utf8")
|
|
|
c722484 |
@@ -267,7 +267,7 @@ def read_and_decrypt_mylogin_cnf(f):
|
|
|
c722484 |
|
|
|
c722484 |
# Create a bytes buffer to hold the plaintext.
|
|
|
c722484 |
plaintext = BytesIO()
|
|
|
c722484 |
- aes = pyaes.AESModeOfOperationECB(rkey)
|
|
|
c722484 |
+ aes = AES.new(rkey, AES.MODE_ECB)
|
|
|
c722484 |
|
|
|
c722484 |
while True:
|
|
|
c722484 |
# Read the length of the ciphertext.
|
|
|
c722484 |
diff --git a/setup.py b/setup.py
|
|
|
c722484 |
index e31f759..883a1ba 100755
|
|
|
c722484 |
--- a/setup.py
|
|
|
c722484 |
+++ b/setup.py
|
|
|
c722484 |
@@ -30,7 +30,7 @@ install_requirements = [
|
|
|
c722484 |
'configobj >= 5.0.5',
|
|
|
c722484 |
'cli_helpers[styles] >= 2.0.1',
|
|
|
c722484 |
'pyperclip >= 1.8.1',
|
|
|
c722484 |
- 'pyaes >= 1.6.1'
|
|
|
c722484 |
+ 'pycryptodomex',
|
|
|
c722484 |
]
|
|
|
c722484 |
|
|
|
c722484 |
if sys.version_info.minor < 9:
|