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:
parent
821d656b59
commit
33dd76c29f
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user