crypto: use pycrytodomex, replace Crypto with Cryptodome (#38017)

mainly because Debian python-cryptodome package use pycrytodomex, which
is a library independent of the old PyCrypto, available under the
Cryptodome name.
This commit is contained in:
Thomas NOËL 2019-11-27 23:24:00 +01:00
parent 84b8f31ae1
commit 0fc5a97113
3 changed files with 7 additions and 7 deletions

View File

@ -129,7 +129,7 @@ setup(name="authentic2",
'Markdown>=2.1',
'python-ldap',
'django-filter>1,<2',
'pycryptodome',
'pycryptodomex',
'django-mellon',
'ldaptools',
'jwcrypto>=0.3.1,<1',

View File

@ -19,11 +19,11 @@ import hashlib
import hmac
import struct
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
from Crypto.Hash import SHA256
from Crypto.Hash import HMAC
from Crypto import Random
from Cryptodome.Cipher import AES
from Cryptodome.Protocol.KDF import PBKDF2
from Cryptodome.Hash import SHA256
from Cryptodome.Hash import HMAC
from Cryptodome import Random
from django.utils.crypto import constant_time_compare
from django.utils.encoding import force_bytes

View File

@ -41,7 +41,7 @@ def test_exceptions():
def test_padding():
from Crypto import Random
from Cryptodome import Random
for i in range(1, 100):
for j in range(2, 32):