GNU CommonC++
Public Member Functions | Protected Member Functions | Friends | List of all members
ost::Digest Class Referenceabstract

The digest base class is used for implementing and deriving one way hashing functions. More...

#include <digest.h>

Inheritance diagram for ost::Digest:
ost::ChecksumDigest ost::CRC16Digest ost::CRC32Digest ost::MD5Digest

Public Member Functions

virtual void initDigest (void)=0
 Reset the digest table to an initial default value. More...
 
virtual ~Digest ()
 

Protected Member Functions

 Digest ()
 
virtual unsigned getSize (void)=0
 Get the size of a digest in octets. More...
 
virtual unsigned getDigest (unsigned char *buffer)=0
 Copy the binary digest buffer to user memory. More...
 
virtual void putDigest (const unsigned char *buffer, unsigned length)=0
 Put data into the digest bypassing the stream subsystem. More...
 
virtual std::ostream & strDigest (std::ostream &os)=0
 print a digest string for export. More...
 

Friends

std::ostream & operator<< (std::ostream &os, Digest &ia)
 

Detailed Description

The digest base class is used for implementing and deriving one way hashing functions.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m base class for hashing services.

Constructor & Destructor Documentation

◆ Digest()

ost::Digest::Digest ( )
protected

◆ ~Digest()

virtual ost::Digest::~Digest ( )
virtual

Member Function Documentation

◆ getDigest()

virtual unsigned ost::Digest::getDigest ( unsigned char *  buffer)
protectedpure virtual

Copy the binary digest buffer to user memory.

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

Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.

◆ getSize()

virtual unsigned ost::Digest::getSize ( void  )
protectedpure virtual

Get the size of a digest in octets.

Returns
number of bytes in digest.

Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.

◆ initDigest()

virtual void ost::Digest::initDigest ( void  )
pure virtual

Reset the digest table to an initial default value.

Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.

◆ putDigest()

virtual void ost::Digest::putDigest ( const unsigned char *  buffer,
unsigned  length 
)
protectedpure virtual

Put data into the digest bypassing the stream subsystem.

Parameters
bufferto read from.
lengthof data.

Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.

◆ strDigest()

virtual std::ostream& ost::Digest::strDigest ( std::ostream &  os)
protectedpure virtual

print a digest string for export.

Returns
string representation of digest.

Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
Digest ia 
)
friend

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