#include <encryptor.h>
|
virtual void | addFieldsToFileHeader (ros::M_string &header_fields) const =0 |
| Add encryptor information to bag file header. More...
|
|
virtual void | decryptChunk (ChunkHeader const &chunk_header, Buffer &decrypted_chunk, ChunkedFile &file) const =0 |
| Decrypt chunk. More...
|
|
virtual uint32_t | encryptChunk (const uint32_t chunk_size, const uint64_t chunk_data_pos, ChunkedFile &file)=0 |
| Encrypt chunk. More...
|
|
virtual void | initialize (Bag const &bag, std::string const &plugin_param)=0 |
| Initialize encryptor. More...
|
|
virtual bool | readEncryptedHeader (boost::function< bool(ros::Header &)> read_header, ros::Header &header, Buffer &header_buffer, ChunkedFile &file)=0 |
| Read encrypted header from bag file. More...
|
|
virtual void | readFieldsFromFileHeader (ros::M_string const &header_fields)=0 |
| Read encryptor information from bag file header. More...
|
|
virtual void | writeEncryptedHeader (boost::function< void(ros::M_string const &)> write_header, ros::M_string const &header_fields, ChunkedFile &file)=0 |
| Write encrypted header to bag file. More...
|
|
virtual | ~EncryptorBase () |
|
Definition at line 86 of file encryptor.h.
◆ EncryptorBase()
rosbag::EncryptorBase::EncryptorBase |
( |
| ) |
|
|
inlineprotected |
◆ ~EncryptorBase()
virtual rosbag::EncryptorBase::~EncryptorBase |
( |
| ) |
|
|
inlinevirtual |
◆ addFieldsToFileHeader()
virtual void rosbag::EncryptorBase::addFieldsToFileHeader |
( |
ros::M_string & |
header_fields | ) |
const |
|
pure virtual |
Add encryptor information to bag file header.
- Parameters
-
header_fields | The header fields of the bag |
Called for a bag being written, this method adds encryptor-specific fields to the bag file header. Those fields are used when decrypting the bag. ENCRYPTOR_FIELD_NAME must be specified in the header except for NoEncryptor.
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
◆ decryptChunk()
Decrypt chunk.
- Parameters
-
chunk_header | The header of the encrypted chunk |
decrypted_chunk | The buffer where decrypted chunk is written to |
file | The bag file stream from which the encrypted chunk is read |
This method reads the encrypted chunk from file stream, decrypts, and writes it to decrypted_chunk.
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
◆ encryptChunk()
virtual uint32_t rosbag::EncryptorBase::encryptChunk |
( |
const uint32_t |
chunk_size, |
|
|
const uint64_t |
chunk_data_pos, |
|
|
ChunkedFile & |
file |
|
) |
| |
|
pure virtual |
Encrypt chunk.
- Returns
- The byte size of the encrypted chunk
- Parameters
-
chunk_size | The byte size of the original chunk |
chunk_data_pos | The start position of the chunk data in bag file stream |
file | The bag file stream |
This method reads the original chunk from [chunk_data_pos, chunk_data_pos+chunk_size), encrypts it, and writes back to the file stream starting at chunk_data_pos.
Implemented in rosbag::NoEncryptor, and rosbag::AesCbcEncryptor.
◆ initialize()
virtual void rosbag::EncryptorBase::initialize |
( |
Bag const & |
bag, |
|
|
std::string const & |
plugin_param |
|
) |
| |
|
pure virtual |
Initialize encryptor.
- Parameters
-
bag | The Bag instance |
plugin_param | The string parameter used while initializing the encryptor |
This method is called by setEncryptorPlugin, which loads an encryptor plugin.
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
◆ readEncryptedHeader()
Read encrypted header from bag file.
- Parameters
-
read_header | The functor reading unencrypted header |
header | The header object read |
header_buffer | The header buffer read |
file | The bag file stream |
This method reads and decrypts encrypted header to output header object (header) and buffer (header_buffer).
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
◆ readFieldsFromFileHeader()
virtual void rosbag::EncryptorBase::readFieldsFromFileHeader |
( |
ros::M_string const & |
header_fields | ) |
|
|
pure virtual |
Read encryptor information from bag file header.
- Parameters
-
header_fields | The header fields of the bag |
Called for a bag being read, this method reads encryptor-specific fields from the bag file header.
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
◆ writeEncryptedHeader()
Write encrypted header to bag file.
- Parameters
-
write_header | The functor writing unencrypted header |
header_fields | The header fields to be written |
file | The bag file stream |
This method encrypts given header fields, and writes them to the bag file.
Implemented in rosbag::AesCbcEncryptor, and rosbag::NoEncryptor.
The documentation for this class was generated from the following file: