Utilities/crypto/__init__.py

changeset 5604
b047181a4a33
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
--- a/Utilities/crypto/__init__.py	Sat Mar 11 14:35:22 2017 +0100
+++ b/Utilities/crypto/__init__.py	Sat Mar 11 18:08:42 2017 +0100
@@ -120,8 +120,8 @@
         masterPW = pwDecode(MasterPassword)
     
     from .py3PBKDF2 import hashPasswordTuple
-    digestname, iterations, salt, hash = hashPasswordTuple(masterPW)
-    key = hash[:32]
+    digestname, iterations, salt, pwHash = hashPasswordTuple(masterPW)
+    key = pwHash[:32]
     from .py3AES import encryptData
     try:
         cipher = encryptData(key, pw.encode("utf-8"))
@@ -273,9 +273,9 @@
     from .py3AES import encryptData
     from .py3PBKDF2 import hashPasswordTuple
     
-    digestname, iterations, salt, hash = \
+    digestname, iterations, salt, pwHash = \
         hashPasswordTuple(password, iterations=hashIterations)
-    key = hash[:keyLength]
+    key = pwHash[:keyLength]
     try:
         cipher = encryptData(key, data)
     except ValueError:

eric ide

mercurial