35 #ifndef ROSBAG_AES_ENCRYPTION_H 36 #define ROSBAG_AES_ENCRYPTION_H 41 #include <openssl/aes.h> 55 void initialize(
Bag const& bag, std::string
const& gpg_key_user);
ChunkedFile reads and writes files which contain interleaved chunks of compressed and uncompressed da...
void initialize(Bag const &bag, std::string const &gpg_key_user)
Initialize encryptor.
static const std::string GPG_USER_FIELD_NAME
std::basic_string< unsigned char > symmetric_key_
std::map< std::string, std::string > M_string
bool readEncryptedHeader(boost::function< bool(ros::Header &)>, ros::Header &header, Buffer &header_buffer, ChunkedFile &)
Read encrypted header from bag file.
std::string gpg_key_user_
void decryptChunk(ChunkHeader const &chunk_header, Buffer &decrypted_chunk, ChunkedFile &file) const
Decrypt chunk.
uint32_t encryptChunk(const uint32_t chunk_size, const uint64_t chunk_data_pos, ChunkedFile &file)
Encrypt chunk.
std::string encrypted_symmetric_key_
static const std::string ENCRYPTED_KEY_FIELD_NAME
void writeEncryptedHeader(boost::function< void(ros::M_string const &)>, ros::M_string const &header_fields, ChunkedFile &)
Write encrypted header to bag file.
void addFieldsToFileHeader(ros::M_string &header_fields) const
Add encryptor information to bag file header.
void readFieldsFromFileHeader(ros::M_string const &header_fields)
Read encryptor information from bag file header.