IBR-DTNSuite  0.8
dtn::security::StrictSerializer Class Reference

#include <StrictSerializer.h>

Inheritance diagram for dtn::security::StrictSerializer:
Collaboration diagram for dtn::security::StrictSerializer:

List of all members.

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::Serializeroperator<< (const dtn::data::Bundle &obj)
virtual dtn::data::Serializeroperator<< (const dtn::data::Block &obj)

Detailed Description

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.


Constructor & Destructor Documentation

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.

does nothing

Definition at line 16 of file StrictSerializer.cpp.


Member Function Documentation

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.

Parameters:
bundlethe bundle to canonicalized
typetype of block, which security result shall be ignored
with_correlatorsays if correlator is used
correlatorthe used correlator
Returns:
a reference to this instance

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().

Here is the call graph for this function:


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