|
@@ -1,4 +1,4 @@
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -13,11 +13,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
"""
|
|
|
Encryption Module used by PwmanDatabase
|
|
@@ -256,16 +256,16 @@ class CryptoEngine(object):
|
|
|
plainkey = cipher.decrypt(str(self._keycrypted).decode('base64'))
|
|
|
key = self._retrievedata(plainkey)
|
|
|
|
|
|
- newpassword1 = self._callback.getnewsecret("Please enter your new \
|
|
|
-password")
|
|
|
- newpassword2 = self._callback.getnewsecret("Please enter your new \
|
|
|
-password again")
|
|
|
+ newpassword1 = self._callback.getnewsecret(("Please enter your new"
|
|
|
+ " password"))
|
|
|
+ newpassword2 = self._callback.getnewsecret(("Please enter your new"
|
|
|
+ "password again"))
|
|
|
while newpassword1 != newpassword2:
|
|
|
print "Passwords do not match!"
|
|
|
- newpassword1 = self._callback.getnewsecret("Please enter your new \
|
|
|
-password")
|
|
|
- newpassword2 = self._callback.getnewsecret("Please enter your new \
|
|
|
-password again")
|
|
|
+ newpassword1 = self._callback.getnewsecret(("Please enter your new"
|
|
|
+ " password"))
|
|
|
+ newpassword2 = self._callback.getnewsecret(("Please enter your new"
|
|
|
+ " password again"))
|
|
|
|
|
|
newcipher = self._getcipher_real(newpassword1, self._algo)
|
|
|
self._keycrypted = str(newcipher.encrypt(
|
|
@@ -353,6 +353,9 @@ password again")
|
|
|
form PyCrypto
|
|
|
"""
|
|
|
if (algo == "AES"):
|
|
|
+ for i in range(1000):
|
|
|
+ key = hashlib.sha256(key)
|
|
|
+ key = key.digest()
|
|
|
key = hashlib.sha256(key)
|
|
|
cipher = cAES.new(key.digest(), cAES.MODE_ECB)
|
|
|
elif (algo == 'ARC2'):
|