rewrite to zmq push and pull patterns.

file load works, suite can start up
This commit is contained in:
Alex Bezdieniezhnykh
2025-01-23 14:37:13 +02:00
parent ce25ef38b0
commit 82b3b526a7
20 changed files with 243 additions and 208 deletions
+8 -5
View File
@@ -1,10 +1,11 @@
import base64
import hashlib
import os
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.hashes import Hash, SHA256
from hashlib import sha384
import base64
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import padding
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
BUFFER_SIZE = 64 * 1024 # 64 KB
@@ -38,7 +39,9 @@ cdef class Security:
decrypted_chunk = decryptor.update(chunk)
res.extend(decrypted_chunk)
res.extend(decryptor.finalize())
return res
unpadder = padding.PKCS7(128).unpadder() # AES block size is 128 bits (16 bytes)
return unpadder.update(res) + unpadder.finalize()
@staticmethod
cdef calc_hash(str key):