eric6/Utilities/crypto/__init__.py

changeset 7259
7c017076c12e
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/Utilities/crypto/__init__.py	Mon Sep 23 19:10:42 2019 +0200
+++ b/eric6/Utilities/crypto/__init__.py	Mon Sep 23 19:22:12 2019 +0200
@@ -38,10 +38,15 @@
     @param pw password to encode (string)
     @return encoded password (string)
     """
-    pop = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" \
-          ".,;:-_!$?*+#"
-    rpw = "".join(random.sample(pop, 32)) + pw + \
+    pop = (
+        "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+        ".,;:-_!$?*+#"
+    )
+    rpw = (
+        "".join(random.sample(pop, 32)) +
+        pw +
         "".join(random.sample(pop, 32))
+    )
     return EncodeMarker + base64.b64encode(rpw.encode("utf-8")).decode("ascii")
 
 
@@ -272,8 +277,8 @@
     from .py3AES import encryptData
     from .py3PBKDF2 import hashPasswordTuple
     
-    digestname, iterations, salt, pwHash = \
-        hashPasswordTuple(password, iterations=hashIterations)
+    digestname, iterations, salt, pwHash = hashPasswordTuple(
+        password, iterations=hashIterations)
     key = pwHash[:keyLength]
     try:
         cipher = encryptData(key, data)

eric ide

mercurial