xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
XrdCksCalccrc32 Class Reference

#include <XrdCksCalccrc32.hh>

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

Public Member Functions

char * Final ()
 
void Init ()
 
XrdCksCalcNew ()
 
void Update (const char *Buff, int BLen)
 
const char * Type (int &csSz)
 
 XrdCksCalccrc32 ()
 
virtual ~XrdCksCalccrc32 ()
 
- 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. More...
 
 XrdCksCalc ()
 Constructor. More...
 
virtual ~XrdCksCalc ()
 Destructor. More...
 

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

XrdCksCalccrc32::XrdCksCalccrc32 ( )
inline

References Init().

Referenced by New().

virtual XrdCksCalccrc32::~XrdCksCalccrc32 ( )
inlinevirtual

Member Function Documentation

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

void XrdCksCalccrc32::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 C32Result, CRC32_XINIT, and TotLen.

Referenced by XrdCksCalccrc32().

XrdCksCalc* XrdCksCalccrc32::New ( )
inlinevirtual

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

Referenced by Final().

Member Data Documentation

unsigned int XrdCksCalccrc32::C32Result
private

Referenced by Final(), and Init().

const unsigned int XrdCksCalccrc32::CRC32_XINIT = 0
staticprivate

Referenced by Init().

const unsigned int XrdCksCalccrc32::CRC32_XOROT = 0xffffffff
staticprivate

Referenced by Final().

unsigned int XrdCksCalccrc32::crctable[256]
staticprivate
unsigned int XrdCksCalccrc32::TheResult
private

Referenced by Final(), and Type().

long long XrdCksCalccrc32::TotLen
private

Referenced by Final(), and Init().


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