xrootd
Public Member Functions | Private Attributes | Static Private Attributes
XrdCksCalcadler32 Class Reference

#include <XrdCksCalcadler32.hh>

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

List of all members.

Public Member Functions

char * Final ()
void Init ()
XrdCksCalc * New ()
void Update (const char *Buff, int BLen)
const char * Type (int &csSize)
 XrdCksCalcadler32 ()
virtual ~XrdCksCalcadler32 ()
- Public Member Functions inherited from XrdCksCalc
virtual char * Calc (const char *Buff, int BLen)
virtual char * Current ()
virtual void Recycle ()
 Recycle the checksum object as it is no longer needed. A default is given.
 XrdCksCalc ()
 Constructor.
virtual ~XrdCksCalc ()
 Destructor.

Private Attributes

unsigned int AdlerValue
unsigned int unSum1
unsigned int unSum2

Static Private Attributes

static const unsigned int AdlerBase = 0xFFF1
static const unsigned int AdlerStart = 0x0001
static const int AdlerNMax = 5552

Constructor & Destructor Documentation

XrdCksCalcadler32::XrdCksCalcadler32 ( )
inline

References Init().

Referenced by New().

virtual XrdCksCalcadler32::~XrdCksCalcadler32 ( )
inlinevirtual

Member Function Documentation

char* XrdCksCalcadler32::Final ( )
inlinevirtual

Get the actual checksum in binary format.

Returns:
the checksum value in binary format. The pointer to the value becomes invalid once the associated object is deleted.

Implements XrdCksCalc.

References AdlerValue, unSum1, and unSum2.

void XrdCksCalcadler32::Init ( )
inlinevirtual

Initializes data structures (must be called by constructor). This is always called to reuse the object for a new checksum.

Implements XrdCksCalc.

References AdlerStart, unSum1, and unSum2.

Referenced by XrdCksCalcadler32().

XrdCksCalc* XrdCksCalcadler32::New ( )
inlinevirtual

Get a new instance of the underlying checksum calculation object.

Returns:
the checksum calculation object.

Implements XrdCksCalc.

References XrdCksCalcadler32().

const char* XrdCksCalcadler32::Type ( int &  csSize)
inlinevirtual

Get the checksum object algorithm name and the number bytes (i.e. size) required for the checksum value.

Parameters:
csSize-> Parameter to hold the size of the checksum value.
Returns:
the checksum algorithm's name. The name persists event after the checksum object is deleted.

Implements XrdCksCalc.

References AdlerValue.

void XrdCksCalcadler32::Update ( const char *  Buff,
int  BLen 
)
inlinevirtual

Compute a running checksum. This method may be called repeatedly for data segments; with Final() returning the full checksum.

Parameters:
Buff-> Data to be checksummed.
BLen-> Length of the data in Buff.

Implements XrdCksCalc.

References AdlerBase, AdlerNMax, DO1, DO16, unSum1, and unSum2.


Member Data Documentation

const unsigned int XrdCksCalcadler32::AdlerBase = 0xFFF1
staticprivate

Referenced by Update().

const int XrdCksCalcadler32::AdlerNMax = 5552
staticprivate

Referenced by Update().

const unsigned int XrdCksCalcadler32::AdlerStart = 0x0001
staticprivate

Referenced by Init().

unsigned int XrdCksCalcadler32::AdlerValue
private

Referenced by Final(), and Type().

unsigned int XrdCksCalcadler32::unSum1
private

Referenced by Final(), Init(), and Update().

unsigned int XrdCksCalcadler32::unSum2
private

Referenced by Final(), Init(), and Update().


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