mirror of
https://github.com/azaion/annotations.git
synced 2026-04-23 03:36:31 +00:00
rewrite to zmq push and pull patterns.
file load works, suite can start up
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user