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

#include <XrdCksCalccrc32.hh>

Inheritance diagram for XrdCksCalccrc32:
Inheritance graph
[legend]
Collaboration diagram for XrdCksCalccrc32:
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 &csSz)
 XrdCksCalccrc32 ()
virtual ~XrdCksCalccrc32 ()

Private Attributes

unsigned int C32Result
unsigned int TheResult
long long TotLen

Static Private Attributes

static const unsigned int CRC32_XINIT = 0
static const unsigned int CRC32_XOROT = 0xffffffff
static unsigned int crctable [256]

Constructor & Destructor Documentation

References Init().

Referenced by New().

virtual XrdCksCalccrc32::~XrdCksCalccrc32 ( ) [inline, virtual]

Member Function Documentation

char* XrdCksCalccrc32::Final ( ) [inline, virtual]

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 C32Result, CRC32_XOROT, TheResult, TotLen, and Update().

void XrdCksCalccrc32::Init ( ) [inline, virtual]

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

Implements XrdCksCalc.

References C32Result, CRC32_XINIT, and TotLen.

Referenced by XrdCksCalccrc32().

XrdCksCalc* XrdCksCalccrc32::New ( ) [inline, virtual]

Get a new instance of the underlying checksum calculation object.

Returns:
the checksum calculation object.

Implements XrdCksCalc.

References XrdCksCalccrc32().

const char* XrdCksCalccrc32::Type ( int &  csSize) [inline, virtual]

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 TheResult.

void XrdCksCalccrc32::Update ( const char *  Buff,
int  BLen 
) [virtual]

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 C32Result, crctable, and TotLen.

Referenced by Final().


Member Data Documentation

unsigned int XrdCksCalccrc32::C32Result [private]

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

const unsigned int XrdCksCalccrc32::CRC32_XINIT = 0 [static, private]

Referenced by Init().

const unsigned int XrdCksCalccrc32::CRC32_XOROT = 0xffffffff [static, private]

Referenced by Final().

unsigned int XrdCksCalccrc32::crctable [static, private]

Referenced by Update().

unsigned int XrdCksCalccrc32::TheResult [private]

Referenced by Final(), and Type().

long long XrdCksCalccrc32::TotLen [private]

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


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