IBR-DTNSuite  0.10
ibrcommon::HashStream Class Referenceabstract

#include <HashStream.h>

Inheritance diagram for ibrcommon::HashStream:
Inheritance graph
Collaboration diagram for ibrcommon::HashStream:
Collaboration graph

Public Member Functions

 HashStream (const unsigned int hash, const size_t buffer=2048)
 
virtual ~HashStream ()
 

Static Public Member Functions

static std::string extract (std::istream &stream)
 

Protected Member Functions

virtual void update (char *buf, const size_t size)=0
 
virtual void finalize (char *hash, unsigned int &size)=0
 
virtual int sync ()
 
virtual std::char_traits< char >
::int_type 
overflow (std::char_traits< char >::int_type=std::char_traits< char >::eof())
 
virtual std::char_traits< char >
::int_type 
underflow ()
 

Detailed Description

Definition at line 32 of file HashStream.h.

Constructor & Destructor Documentation

ibrcommon::HashStream::HashStream ( const unsigned int  hash,
const size_t  buffer = 2048 
)

Definition at line 27 of file HashStream.cpp.

ibrcommon::HashStream::~HashStream ( )
virtual

Definition at line 35 of file HashStream.cpp.

Member Function Documentation

std::string ibrcommon::HashStream::extract ( std::istream &  stream)
static

Definition at line 39 of file HashStream.cpp.

Referenced by dtn::security::BundleAuthenticationBlock::calcMAC().

virtual void ibrcommon::HashStream::finalize ( char *  hash,
unsigned int &  size 
)
protectedpure virtual

Implemented in ibrcommon::HMacStream.

Referenced by underflow().

std::char_traits< char >::int_type ibrcommon::HashStream::overflow ( std::char_traits< char >::int_type  c = std::char_traits<char>::eof())
protectedvirtual

Definition at line 55 of file HashStream.cpp.

References update().

Referenced by sync().

Here is the call graph for this function:

int ibrcommon::HashStream::sync ( )
protectedvirtual

Definition at line 46 of file HashStream.cpp.

References overflow().

Here is the call graph for this function:

std::char_traits< char >::int_type ibrcommon::HashStream::underflow ( )
protectedvirtual

Definition at line 80 of file HashStream.cpp.

References finalize().

Here is the call graph for this function:

virtual void ibrcommon::HashStream::update ( char *  buf,
const size_t  size 
)
protectedpure virtual

Implemented in ibrcommon::HMacStream.

Referenced by overflow().


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