diff libervia/backend/memory/crypto.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/memory/crypto.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/memory/crypto.py	Wed Jun 19 18:44:57 2024 +0200
@@ -57,7 +57,9 @@
 
         cipher = Cipher(algorithms.AES(key), modes.CFB8(iv), backend=crypto_backend)
         encryptor = cipher.encryptor()
-        encrypted = encryptor.update(BlockCipher.pad(text.encode())) + encryptor.finalize()
+        encrypted = (
+            encryptor.update(BlockCipher.pad(text.encode())) + encryptor.finalize()
+        )
         return b64encode(iv + encrypted).decode()
 
     @staticmethod
@@ -149,7 +151,7 @@
             length=16,
             salt=salt,
             iterations=1000,
-            backend=crypto_backend
+            backend=crypto_backend,
         )
         key = kdf.derive(password.encode())
         return b64encode(salt + key).decode()