#include <aes_encryptor.h>
|
void | addFieldsToFileHeader (ros::M_string &header_fields) const |
| Add encryptor information to bag file header. More...
|
|
| AesCbcEncryptor () |
|
void | decryptChunk (ChunkHeader const &chunk_header, Buffer &decrypted_chunk, ChunkedFile &file) const |
| Decrypt chunk. More...
|
|
uint32_t | encryptChunk (const uint32_t chunk_size, const uint64_t chunk_data_pos, ChunkedFile &file) |
| Encrypt chunk. More...
|
|
void | initialize (Bag const &bag, std::string const &gpg_key_user) |
| Initialize encryptor. More...
|
|
bool | readEncryptedHeader (boost::function< bool(ros::Header &)>, ros::Header &header, Buffer &header_buffer, ChunkedFile &) |
| Read encrypted header from bag file. More...
|
|
void | readFieldsFromFileHeader (ros::M_string const &header_fields) |
| Read encryptor information from bag file header. More...
|
|
void | writeEncryptedHeader (boost::function< void(ros::M_string const &)>, ros::M_string const &header_fields, ChunkedFile &) |
| Write encrypted header to bag file. More...
|
|
| ~AesCbcEncryptor () |
|
virtual | ~EncryptorBase () |
|
Definition at line 45 of file aes_encryptor.h.
◆ AesCbcEncryptor()
rosbag::AesCbcEncryptor::AesCbcEncryptor |
( |
| ) |
|
|
inline |
◆ ~AesCbcEncryptor()
rosbag::AesCbcEncryptor::~AesCbcEncryptor |
( |
| ) |
|
|
inline |
◆ addFieldsToFileHeader()
void rosbag::AesCbcEncryptor::addFieldsToFileHeader |
( |
ros::M_string & |
header_fields | ) |
const |
|
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.
Implements rosbag::EncryptorBase.
Definition at line 242 of file aes_encryptor.cpp.
◆ buildSymmetricKey()
void rosbag::AesCbcEncryptor::buildSymmetricKey |
( |
| ) |
|
|
private |
◆ 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.
Implements rosbag::EncryptorBase.
Definition at line 219 of file aes_encryptor.cpp.
◆ encryptChunk()
uint32_t rosbag::AesCbcEncryptor::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_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.
Implements rosbag::EncryptorBase.
Definition at line 196 of file aes_encryptor.cpp.
◆ initialize()
void rosbag::AesCbcEncryptor::initialize |
( |
Bag const & |
bag, |
|
|
std::string const & |
plugin_param |
|
) |
| |
|
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.
Implements rosbag::EncryptorBase.
Definition at line 175 of file aes_encryptor.cpp.
◆ 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).
Implements rosbag::EncryptorBase.
Definition at line 285 of file aes_encryptor.cpp.
◆ readFieldsFromFileHeader()
void rosbag::AesCbcEncryptor::readFieldsFromFileHeader |
( |
ros::M_string const & |
header_fields | ) |
|
|
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.
Implements rosbag::EncryptorBase.
Definition at line 248 of file aes_encryptor.cpp.
◆ 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.
Implements rosbag::EncryptorBase.
Definition at line 261 of file aes_encryptor.cpp.
◆ aes_decrypt_key_
AES_KEY rosbag::AesCbcEncryptor::aes_decrypt_key_ |
|
private |
◆ aes_encrypt_key_
AES_KEY rosbag::AesCbcEncryptor::aes_encrypt_key_ |
|
private |
◆ ENCRYPTED_KEY_FIELD_NAME
const std::string rosbag::AesCbcEncryptor::ENCRYPTED_KEY_FIELD_NAME = "encrypted_key" |
|
static |
◆ encrypted_symmetric_key_
std::string rosbag::AesCbcEncryptor::encrypted_symmetric_key_ |
|
private |
◆ gpg_key_user_
std::string rosbag::AesCbcEncryptor::gpg_key_user_ |
|
private |
◆ GPG_USER_FIELD_NAME
const std::string rosbag::AesCbcEncryptor::GPG_USER_FIELD_NAME = "gpg_user" |
|
static |
◆ symmetric_key_
std::basic_string<unsigned char> rosbag::AesCbcEncryptor::symmetric_key_ |
|
private |
The documentation for this class was generated from the following files: