IBR-DTNSuite
0.12
|
#include <StrictSerializer.h>
Additional Inherited Members | |
Protected Member Functions inherited from dtn::data::DefaultSerializer | |
Serializer & | serialize (const dtn::data::PayloadBlock &obj, const Length &clip_offset, const Length &clip_length) |
void | rebuildDictionary (const dtn::data::Bundle &obj) |
bool | isCompressable (const dtn::data::Bundle &obj) const |
Protected Attributes inherited from dtn::data::DefaultSerializer | |
std::ostream & | _stream |
Dictionary | _dictionary |
bool | _compressable |
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 40 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 dtn::data::Number & | correlator = 0 |
||
) |
Constructs a StrictSerializer, which will stream into stream
Definition at line 34 of file StrictSerializer.cpp.
|
virtual |
does nothing
Definition at line 39 of file StrictSerializer.cpp.
|
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 43 of file StrictSerializer.cpp.
References dtn::security::SecurityBlock::_ciphersuite_flags, dtn::security::SecurityBlock::_correlator, dtn::data::Bundle::begin(), dtn::security::SecurityBlock::BUNDLE_AUTHENTICATION_BLOCK, dtn::security::SecurityBlock::CONTAINS_CORRELATOR, dtn::data::Bundle::end(), dtn::data::Block::getType(), dtn::security::SecurityBlock::PAYLOAD_INTEGRITY_BLOCK, and dtn::data::DefaultSerializer::rebuildDictionary().
|
virtual |
Reimplemented from dtn::data::DefaultSerializer.
Definition at line 91 of file StrictSerializer.cpp.
References dtn::data::DefaultSerializer::_compressable, dtn::data::DefaultSerializer::_dictionary, dtn::data::DefaultSerializer::_stream, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::get(), dtn::data::Block::getEIDList(), dtn::data::Block::getLength_strict(), dtn::data::Block::getProcessingFlags(), dtn::data::Dictionary::getRef(), dtn::data::Block::getType(), and dtn::data::Block::serialize_strict().