encryption
Package¶
data_encryption_handler
¶
- class tvb.storage.h5.encryption.data_encryption_handler.DataEncryptionHandler[source]¶
Bases:
object
- APP_ENCRYPTION_HANDLER = 'APP_ENCRYPTION_HANDLER'¶
- CRYPTO_PASS = 'CRYPTO_PASS'¶
- ENCRYPTED_FOLDER_SUFFIX = '_encrypted'¶
- KEYS_FOLDER = '.storage-keys'¶
- check_and_delete(**kw)¶
New function will actually write the Lock.
- dec_queue_count(**kw)¶
New function will actually write the Lock.
- dec_running_op_count(**kw)¶
New function will actually write the Lock.
- file_helper = <tvb.storage.h5.file.files_helper.FilesHelper object>¶
- inc_project_usage_count(**kw)¶
New function will actually write the Lock.
- inc_running_op_count(**kw)¶
New function will actually write the Lock.
- linked_projects = {}¶
- lock = <unlocked _thread.lock object>¶
- marked_for_delete = {}¶
- queue_elements_count = {}¶
- running_operations = {}¶
- sync_project_queue = <queue.Queue object>¶
- users_project_usage = {}¶
- class tvb.storage.h5.encryption.data_encryption_handler.DataEncryptionHandlerBuilder[source]¶
Bases:
object
- class tvb.storage.h5.encryption.data_encryption_handler.DataEncryptionHandlerMeta[source]¶
Bases:
type
Metaclass used to generate the singleton instance
- class tvb.storage.h5.encryption.data_encryption_handler.DataEncryptionRemoteHandler[source]¶
Bases:
DataEncryptionHandler
- check_and_delete(**kw)¶
New function will actually write the Lock.
- dec_queue_count(**kw)¶
New function will actually write the Lock.
- dec_running_op_count(**kw)¶
New function will actually write the Lock.
- inc_project_usage_count(**kw)¶
New function will actually write the Lock.
- inc_running_op_count(**kw)¶
New function will actually write the Lock.
- is_in_usage(**kw)¶
New function will actually write the Lock.
- lock = <unlocked _thread.lock object>¶
- class tvb.storage.h5.encryption.data_encryption_handler.FoldersQueueConsumer(group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)[source]¶
Bases:
Thread
- marked_stop = False¶
- run()[source]¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- was_processing = False¶
- exception tvb.storage.h5.encryption.data_encryption_handler.InvalidStorageEncryptionException(message)[source]¶
Bases:
TVBException
Exception thrown when encryption storage cannot be allowed.
encryption_handler
¶
- class tvb.storage.h5.encryption.encryption_handler.EncryptionHandler(dir_gid)[source]¶
Bases:
object
- decrypt_files_to_dir(files: list, dir: str) list [source]¶
Given a list of encrypted files, decrypt them, then move plain files to the location specified by :param dir
- decrypt_results_to_dir(dir: str, from_subdir: str | None = None) list [source]¶
Having an already encrypted directory, decrypt all files, then move plain files to the location specified by :param dir
- encrypt_inputs(files_to_encrypt: list, subdir: str | None = None) list [source]¶
Receive a list with all files to encrypt. Prepare encryption directory and encrypt each file. Return a list with all files from the encrypted directory.
- encrypted_dir_name_regex = 'cipher_{}'¶
- encrypted_suffix = '.aes'¶
import_export_encryption_handler
¶
This module contains the necessary methods for encryption and decryption at import/export.
- class tvb.storage.h5.encryption.import_export_encryption_handler.ImportExportEncryptionHandler[source]¶
Bases:
object
- DECRYPTED_DATA_SUFFIX = '_decrypted'¶
- ENCRYPTED_DATA_SUFFIX = '_encrypted'¶
- ENCRYPTED_PASSWORD_NAME = 'encrypted_password.pem'¶
- PRIVATE_KEY_NAME = 'private_key.pem'¶
- PUBLIC_KEY_NAME = 'public_key.pem'¶