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:
parent
84b8f31ae1
commit
0fc5a97113
2
setup.py
2
setup.py
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue