class _ROSBagAesCbcEncryptor(_ROSBagEncryptor):
Constructor: _ROSBagAesCbcEncryptor()
Class for AES-CBC-encrypted bags.
Method | __init__ |
Create AES encryptor. |
Method | add |
Add encryptor information to bag file header. @param header: bag file header @type header: dict |
Method | add |
Add rows for rosbag info. @param rows: information on bag encryption @type rows: list of tuples |
Method | decrypt |
Decrypt chunk. @param encrypted_chunk: chunk to decrypt @type encrypted_chunk: str @return: decrypted chunk @rtype: str @raise ROSBagFormatException: if size of input chunk is not multiple of AES block size... |
Method | encrypt |
Read chunk from file, encrypt it, and write back to file. @param chunk_size: size of chunk @type chunk_size: int @param chunk_data_pos: position of chunk data portion @type chunk_data_pos: int @param f: file stream @type f: file @return: size of initialization vector and encrypted chunk @rtype: int... |
Method | get |
Return string for rosbag info. @return: information on bag encryption @rtype: str |
Method | initialize |
Initialize encryptor by composing AES symmetric key. @param bag: bag to be encrypted/decrypted @type bag: Bag @param gpg_key_user: user name of GPG key used for symmetric key encryption @type gpg_key_user: str @raise ROSBagException: if GPG key user has already been set... |
Method | read |
Read encrypted header from bag file. @param f: file stream @type f: file @param req_op: expected header op code @type req_op: int @return: decrypted header @rtype: dict @raise ROSBagFormatException: if error occurs while decrypting/reading header... |
Method | read |
Read encryptor information from bag file header. @param header: bag file header @type header: dict @raise ROSBagFormatException: if GPG key user is not found in header |
Method | write |
Write encrypted header to bag file. @param f: file stream @type f: file @param header: unencrypted header @type header: dict @return: encrypted string representing header @rtype: str |
Constant | NAME |
Undocumented |
Method | _build |
Undocumented |
Method | _decrypt |
Undocumented |
Constant | _ENCRYPTED |
Undocumented |
Constant | _GPG |
Undocumented |
Instance Variable | _encrypted |
Undocumented |
Instance Variable | _gpg |
Undocumented |
Instance Variable | _gpg |
Undocumented |
Instance Variable | _symmetric |
Undocumented |
Inherited from _ROSBagEncryptor
:
Constant | _ENCRYPTOR |
Undocumented |
Decrypt chunk. @param encrypted_chunk: chunk to decrypt @type encrypted_chunk: str @return: decrypted chunk @rtype: str @raise ROSBagFormatException: if size of input chunk is not multiple of AES block size
Read chunk from file, encrypt it, and write back to file. @param chunk_size: size of chunk @type chunk_size: int @param chunk_data_pos: position of chunk data portion @type chunk_data_pos: int @param f: file stream @type f: file @return: size of initialization vector and encrypted chunk @rtype: int
Initialize encryptor by composing AES symmetric key. @param bag: bag to be encrypted/decrypted @type bag: Bag @param gpg_key_user: user name of GPG key used for symmetric key encryption @type gpg_key_user: str @raise ROSBagException: if GPG key user has already been set
Read encrypted header from bag file. @param f: file stream @type f: file @param req_op: expected header op code @type req_op: int @return: decrypted header @rtype: dict @raise ROSBagFormatException: if error occurs while decrypting/reading header
Read encryptor information from bag file header. @param header: bag file header @type header: dict @raise ROSBagFormatException: if GPG key user is not found in header