1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 19:05:16 +00:00

Replace pycrypto with pycryptodome

This commit is contained in:
zhengxie 2018-12-07 13:09:25 +08:00
parent 821d656b59
commit 33dd76c29f
2 changed files with 2 additions and 2 deletions

View File

@ -5,5 +5,5 @@ transifex-client
raven==5.0.0
mysqlclient==1.3.12
pycrypto==2.6.1
pycryptodome==3.7.2
psd-tools==1.4

View File

@ -35,7 +35,7 @@ class AESPasswordHasher:
if not secret:
secret = settings.SECRET_KEY[:BLOCK_SIZE]
self.cipher = AES.new(secret)
self.cipher = AES.new(secret, AES.MODE_ECB)
def encode(self, password):
return "%s$%s" % (self.algorithm, EncodeAES(self.cipher, password))