IBR-DTNSuite
0.8
|
#include <StrictSerializer.h>
Public Member Functions | |
StrictSerializer (std::ostream &stream, const SecurityBlock::BLOCK_TYPES type=SecurityBlock::BUNDLE_AUTHENTICATION_BLOCK, const bool with_correlator=false, const u_int64_t correlator=0) | |
virtual | ~StrictSerializer () |
virtual dtn::data::Serializer & | operator<< (const dtn::data::Bundle &obj) |
virtual dtn::data::Serializer & | operator<< (const dtn::data::Block &obj) |
Serializes a bundle in strict canonical form in order to hash it for BundleAuthenticationBlocks. Use serialize_strict() to get the strict canonical form written into a stream. Its behaviour differs not much from the DefaultSerializer. The only exception is the special treatment of the BundleAuthenticationBlock or PayloadIntegrityBlock. Their security result will not be serialized.
Definition at line 19 of file StrictSerializer.h.
dtn::security::StrictSerializer::StrictSerializer | ( | std::ostream & | stream, |
const SecurityBlock::BLOCK_TYPES | type = SecurityBlock::BUNDLE_AUTHENTICATION_BLOCK , |
||
const bool | with_correlator = false , |
||
const u_int64_t | correlator = 0 |
||
) |
Constructs a StrictSerializer, which will stream into stream
Definition at line 11 of file StrictSerializer.cpp.
dtn::security::StrictSerializer::~StrictSerializer | ( | ) | [virtual] |
does nothing
Definition at line 16 of file StrictSerializer.cpp.
dtn::data::Serializer & dtn::security::StrictSerializer::operator<< | ( | const dtn::data::Bundle & | obj | ) | [virtual] |
Serializes the given bundle and ignores the security result of the block type. If a correlator is given only the primary block and the blocks containing this correlator and the date between them will be written.
bundle | the bundle to canonicalized |
type | type of block, which security result shall be ignored |
with_correlator | says if correlator is used |
correlator | the used correlator |
Reimplemented from dtn::data::DefaultSerializer.
Definition at line 20 of file StrictSerializer.cpp.
References dtn::security::SecurityBlock::_ciphersuite_flags, dtn::security::SecurityBlock::_correlator, dtn::security::SecurityBlock::BUNDLE_AUTHENTICATION_BLOCK, dtn::security::SecurityBlock::CONTAINS_CORRELATOR, dtn::data::Block::getType(), dtn::security::SecurityBlock::PAYLOAD_INTEGRITY_BLOCK, and dtn::data::DefaultSerializer::rebuildDictionary().
dtn::data::Serializer & dtn::security::StrictSerializer::operator<< | ( | const dtn::data::Block & | obj | ) | [virtual] |
Reimplemented from dtn::data::DefaultSerializer.
Definition at line 69 of file StrictSerializer.cpp.
References dtn::data::Block::_blocktype, dtn::data::DefaultSerializer::_compressable, dtn::data::DefaultSerializer::_dictionary, dtn::data::Block::_eids, dtn::data::DefaultSerializer::_stream, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::get(), dtn::data::Block::getLength_strict(), dtn::data::Dictionary::getRef(), and dtn::data::Block::serialize_strict().