decrypt
Core logic to decrypt encrypted data on mirrored cache files (encryption key must be already available)
Classes:
-
CacheDecryptor–Class to decrypt the encrypted data on cache files
Functions:
-
sanitize_content–Function to sanitize plain text fully-decrypted content from bytes values
CacheDecryptor
Class to decrypt the encrypted data on cache files
C-tor
Parameters:
-
(keyfilestr, default:'') –Encryption key file
Methods:
-
decompose_encrypted_data–Function to decompose the encrypted data into the 3 required segments
-
decrypt–Function to decrypt the encrypted data
-
export_json–Function
-
get_bytes_length–Function to get/print binary data
-
get_symmetric_key–Function to load the symmetric key from key file
-
load_file–Function to load a cache file (encrypted binary property list)
decompose_encrypted_data
staticmethod
decompose_encrypted_data(encrypted_data: bytes) -> Dict[str, bytes]
Function to decompose the encrypted data into the 3 required segments
Parameters:
-
(encrypted_databytes) –Encrypted data (bytes)
Returns:
-
Dict[str, bytes]–Dict of encrypted data segments
decrypt
Function to decrypt the encrypted data
Parameters:
-
(target_filenamestr) –Target filename
Returns:
-
Any | None–Decrypted data
export_json
staticmethod
get_bytes_length
staticmethod
get_symmetric_key
Function to load the symmetric key from key file
Parameters:
-
(key_filestr) –Key file
Returns:
-
bytes | None–Symmetric key, nothing otherwise