Commit 887e7d8c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

py2/py3: workaround for obsolete pycrypto in Python 3.

parent 00c0c86f
...@@ -51,8 +51,14 @@ from Products.ERP5Security.ERP5UserManager import ERP5UserManager, \ ...@@ -51,8 +51,14 @@ from Products.ERP5Security.ERP5UserManager import ERP5UserManager, \
_AuthenticationFailure _AuthenticationFailure
from Products import ERP5Security from Products import ERP5Security
# TODO pycrypto is obsolete and should be replaced by cryptography or pycryptodome
from Crypto.Cipher import AES from Crypto.Cipher import AES
from Crypto import Random from Crypto import Random
import six
if six.PY3:
import time
time.clock = time.process_time
from base64 import urlsafe_b64decode, urlsafe_b64encode from base64 import urlsafe_b64decode, urlsafe_b64encode
class AESCipher: class AESCipher:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment