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

#include <StrictSerializer.h>

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

Public Member Functions

 StrictSerializer (std::ostream &stream, const SecurityBlock::BLOCK_TYPES type=SecurityBlock::BUNDLE_AUTHENTICATION_BLOCK, const bool with_correlator=false, const dtn::data::Number &correlator=0)
 
virtual ~StrictSerializer ()
 
virtual dtn::data::Serializeroperator<< (const dtn::data::Bundle &obj)
 
virtual dtn::data::Serializeroperator<< (const dtn::data::Block &obj)
 
- Public Member Functions inherited from dtn::data::DefaultSerializer
 DefaultSerializer (std::ostream &stream)
 
 DefaultSerializer (std::ostream &stream, const Dictionary &d)
 
virtual ~DefaultSerializer ()
 
virtual Serializeroperator<< (const dtn::data::PrimaryBlock &obj)
 
virtual Serializeroperator<< (const dtn::data::BundleFragment &obj)
 
virtual Length getLength (const dtn::data::Bundle &obj)
 
virtual Length getLength (const dtn::data::PrimaryBlock &obj) const
 
virtual Length getLength (const dtn::data::Block &obj) const
 
- Public Member Functions inherited from dtn::data::Serializer
virtual ~Serializer ()
 

Additional Inherited Members

- Protected Member Functions inherited from dtn::data::DefaultSerializer
Serializerserialize (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
 

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 40 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 dtn::data::Number correlator = 0 
)

Constructs a StrictSerializer, which will stream into stream

Definition at line 34 of file StrictSerializer.cpp.

dtn::security::StrictSerializer::~StrictSerializer ( )
virtual

does nothing

Definition at line 39 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 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().

Here is the call graph for this function:


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