chore: update black, new formatting + pre-commit (#3885)

This commit is contained in:
dni ⚡
2026-03-23 10:04:00 +01:00
committed by GitHub
parent 7a393b11fd
commit efc0547271
9 changed files with 119 additions and 178 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ def encrypt_content(priv_key, dest_pub_key, content):
def decrypt_content(priv_key, source_pub_key, content):
p = PublicKey(bytes.fromhex("02" + source_pub_key))
shared = p.multiply(bytes.fromhex(priv_key)).format()[1:]
(encrypted_content_b64, iv_b64) = content.split("?iv=")
encrypted_content_b64, iv_b64 = content.split("?iv=")
encrypted_content = base64.b64decode(encrypted_content_b64.encode("ascii"))
iv = base64.b64decode(iv_b64.encode("ascii"))
aes = AES.new(shared, AES.MODE_CBC, iv)