Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes
ChecksumDigest Class Reference

A simple checksum digest function. More...

#include <digest.h>

Inheritance diagram for ChecksumDigest:
Inheritance graph
[legend]
Collaboration diagram for ChecksumDigest:
Collaboration graph
[legend]

Public Member Functions

 ChecksumDigest ()
 
void initDigest (void)
 Reset the digest table to an initial default value. More...
 
unsigned getSize (void)
 Get the size of a digest in octets. More...
 
unsigned getDigest (unsigned char *buffer)
 Copy the binary digest buffer to user memory. More...
 
void putDigest (const unsigned char *buffer, unsigned length)
 Put data into the digest bypassing the stream subsystem. More...
 

Protected Member Functions

int overflow (int c)
 
std::ostream & strDigest (std::ostream &os)
 print a digest string for export. More...
 

Private Attributes

unsigned char csum
 

Detailed Description

A simple checksum digest function.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m checksum hash function.

Definition at line 123 of file digest.h.

Constructor & Destructor Documentation

ChecksumDigest::ChecksumDigest ( )

Member Function Documentation

unsigned ChecksumDigest::getDigest ( unsigned char *  buffer)
virtual

Copy the binary digest buffer to user memory.

Returns
number of bytes in digest.
Parameters
bufferto write into.

Implements Digest.

unsigned ChecksumDigest::getSize ( void  )
inlinevirtual

Get the size of a digest in octets.

Returns
number of bytes in digest.

Implements Digest.

Definition at line 138 of file digest.h.

void ChecksumDigest::initDigest ( void  )
inlinevirtual

Reset the digest table to an initial default value.

Implements Digest.

Definition at line 135 of file digest.h.

int ChecksumDigest::overflow ( int  c)
protected
void ChecksumDigest::putDigest ( const unsigned char *  buffer,
unsigned  length 
)
virtual

Put data into the digest bypassing the stream subsystem.

Parameters
bufferto read from.
lengthof data.

Implements Digest.

std::ostream& ChecksumDigest::strDigest ( std::ostream &  os)
protectedvirtual

print a digest string for export.

Returns
string representation of digest.

Implements Digest.

Field Documentation

unsigned char ChecksumDigest::csum
private

Definition at line 126 of file digest.h.


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