diff --git a/apps/authentication/utils.py b/apps/authentication/utils.py index f6750a73d..f8571d6d7 100644 --- a/apps/authentication/utils.py +++ b/apps/authentication/utils.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- # import base64 -from Crypto.PublicKey import RSA -from Crypto.Cipher import PKCS1_v1_5 -from Crypto import Random +from Cryptodome.PublicKey import RSA +from Cryptodome.Cipher import PKCS1_v1_5 +from Cryptodome import Random from common.utils import get_logger diff --git a/apps/common/utils/crypto.py b/apps/common/utils/crypto.py index 31991c93c..6d8cbb10c 100644 --- a/apps/common/utils/crypto.py +++ b/apps/common/utils/crypto.py @@ -1,7 +1,7 @@ import base64 -from Crypto.Cipher import AES -from Crypto.Util.Padding import pad -from Crypto.Random import get_random_bytes +from Cryptodome.Cipher import AES +from Cryptodome.Util.Padding import pad +from Cryptodome.Random import get_random_bytes from django.conf import settings diff --git a/requirements/requirements.txt b/requirements/requirements.txt index f2f3a1ee5..0738911c1 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -53,8 +53,7 @@ Pillow==7.1.0 pyasn1==0.4.8 pycparser==2.19 pycrypto==2.6.1 -pycryptodome==3.9.7 -pycryptodomex==3.9.7 +pycryptodomex==3.9.9 pyotp==2.2.6 PyNaCl==1.2.1 python-dateutil==2.6.1