Public Member Functions | List of all members
rosbag::NoEncryptor Class Reference

#include <no_encryptor.h>

Inheritance diagram for rosbag::NoEncryptor:
Inheritance graph
[legend]

Public Member Functions

void addFieldsToFileHeader (ros::M_string &) const
 Add encryptor information to bag file header. More...
 
void decryptChunk (ChunkHeader const &, Buffer &, ChunkedFile &) const
 Decrypt chunk. More...
 
uint32_t encryptChunk (const uint32_t, const uint64_t, ChunkedFile &)
 Encrypt chunk. More...
 
void initialize (Bag const &, std::string const &)
 Initialize encryptor. More...
 
 NoEncryptor ()
 
bool readEncryptedHeader (boost::function< bool(ros::Header &)>, ros::Header &, Buffer &, ChunkedFile &)
 Read encrypted header from bag file. More...
 
void readFieldsFromFileHeader (ros::M_string const &)
 Read encryptor information from bag file header. More...
 
void writeEncryptedHeader (boost::function< void(ros::M_string const &)>, ros::M_string const &, ChunkedFile &)
 Write encrypted header to bag file. More...
 
 ~NoEncryptor ()
 
- Public Member Functions inherited from rosbag::EncryptorBase
virtual ~EncryptorBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from rosbag::EncryptorBase
 EncryptorBase ()
 

Detailed Description

Definition at line 43 of file no_encryptor.h.

Constructor & Destructor Documentation

◆ NoEncryptor()

rosbag::NoEncryptor::NoEncryptor ( )
inline

Definition at line 46 of file no_encryptor.h.

◆ ~NoEncryptor()

rosbag::NoEncryptor::~NoEncryptor ( )
inline

Definition at line 47 of file no_encryptor.h.

Member Function Documentation

◆ addFieldsToFileHeader()

void rosbag::NoEncryptor::addFieldsToFileHeader ( ros::M_string header_fields) const
inlinevirtual

Add encryptor information to bag file header.

Parameters
header_fieldsThe 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.

Implements rosbag::EncryptorBase.

Definition at line 52 of file no_encryptor.h.

◆ decryptChunk()

void rosbag::NoEncryptor::decryptChunk ( ChunkHeader const &  chunk_header,
Buffer decrypted_chunk,
ChunkedFile file 
) const
virtual

Decrypt chunk.

Parameters
chunk_headerThe header of the encrypted chunk
decrypted_chunkThe buffer where decrypted chunk is written to
fileThe 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.

Implements rosbag::EncryptorBase.

Definition at line 47 of file no_encryptor.cpp.

◆ encryptChunk()

uint32_t rosbag::NoEncryptor::encryptChunk ( const uint32_t  chunk_size,
const uint64_t  chunk_data_pos,
ChunkedFile file 
)
virtual

Encrypt chunk.

Returns
The byte size of the encrypted chunk
Parameters
chunk_sizeThe byte size of the original chunk
chunk_data_posThe start position of the chunk data in bag file stream
fileThe 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.

Implements rosbag::EncryptorBase.

Definition at line 45 of file no_encryptor.cpp.

◆ initialize()

void rosbag::NoEncryptor::initialize ( Bag const &  bag,
std::string const &  plugin_param 
)
inlinevirtual

Initialize encryptor.

Parameters
bagThe Bag instance
plugin_paramThe string parameter used while initializing the encryptor

This method is called by setEncryptorPlugin, which loads an encryptor plugin.

Implements rosbag::EncryptorBase.

Definition at line 49 of file no_encryptor.h.

◆ readEncryptedHeader()

bool rosbag::NoEncryptor::readEncryptedHeader ( boost::function< bool(ros::Header &)>  read_header,
ros::Header header,
Buffer header_buffer,
ChunkedFile file 
)
virtual

Read encrypted header from bag file.

Parameters
read_headerThe functor reading unencrypted header
headerThe header object read
header_bufferThe header buffer read
fileThe bag file stream

This method reads and decrypts encrypted header to output header object (header) and buffer (header_buffer).

Implements rosbag::EncryptorBase.

Definition at line 56 of file no_encryptor.cpp.

◆ readFieldsFromFileHeader()

void rosbag::NoEncryptor::readFieldsFromFileHeader ( ros::M_string const &  header_fields)
inlinevirtual

Read encryptor information from bag file header.

Parameters
header_fieldsThe header fields of the bag

Called for a bag being read, this method reads encryptor-specific fields from the bag file header.

Implements rosbag::EncryptorBase.

Definition at line 53 of file no_encryptor.h.

◆ writeEncryptedHeader()

void rosbag::NoEncryptor::writeEncryptedHeader ( boost::function< void(ros::M_string const &)>  write_header,
ros::M_string const &  header_fields,
ChunkedFile file 
)
virtual

Write encrypted header to bag file.

Parameters
write_headerThe functor writing unencrypted header
header_fieldsThe header fields to be written
fileThe bag file stream

This method encrypts given header fields, and writes them to the bag file.

Implements rosbag::EncryptorBase.

Definition at line 52 of file no_encryptor.cpp.


The documentation for this class was generated from the following files:


rosbag_storage
Author(s): Dirk Thomas
autogenerated on Mon Feb 28 2022 23:33:55