xrootd
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdCksCalcmd5 Class Reference

#include <XrdCksCalcmd5.hh>

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

Classes

struct  MD5Context
 

Public Member Functions

char * Current ()
 
void Init ()
 
XrdCksCalcNew ()
 
char * Final ()
 
void Update (const char *Buff, int BLen)
 
const char * Type (int &csSz)
 
 XrdCksCalcmd5 ()
 
 ~XrdCksCalcmd5 ()
 
- Public Member Functions inherited from XrdCksCalc
virtual char * Calc (const char *Buff, int BLen)
 
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 Member Functions

void byteReverse (unsigned char *buf, unsigned longs)
 
void MD5Update (unsigned char const *buf, unsigned int len)
 
void MD5Transform (unsigned int buf[4], unsigned int const in[16])
 

Private Attributes

MD5Context myContext
 
unsigned char myDigest [16]
 

Constructor & Destructor Documentation

XrdCksCalcmd5::XrdCksCalcmd5 ( )
inline

References Init().

Referenced by New().

XrdCksCalcmd5::~XrdCksCalcmd5 ( )
inline

Member Function Documentation

void XrdCksCalcmd5::byteReverse ( unsigned char *  buf,
unsigned  longs 
)
private

Referenced by Final(), and MD5Update().

char* XrdCksCalcmd5::Current ( )
inlinevirtual

Get the current binary checksum value (defaults to final). However, the final checksum result is not affected.

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

Reimplemented from XrdCksCalc.

References Final(), and myContext.

char * XrdCksCalcmd5::Final ( )
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 XrdCksCalcmd5::MD5Context::bits, XrdCksCalcmd5::MD5Context::buf, byteReverse(), XrdCksCalcmd5::MD5Context::in, MD5Transform(), myContext, and myDigest.

Referenced by Current().

void XrdCksCalcmd5::Init ( )
virtual

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

Implements XrdCksCalc.

References XrdCksCalcmd5::MD5Context::bits, XrdCksCalcmd5::MD5Context::buf, and myContext.

Referenced by XrdCksCalcmd5().

void XrdCksCalcmd5::MD5Transform ( unsigned int  buf[4],
unsigned int const  in[16] 
)
private

References F1, F2, F3, F4, and MD5STEP.

Referenced by Final(), and MD5Update().

void XrdCksCalcmd5::MD5Update ( unsigned char const *  buf,
unsigned int  len 
)
private
XrdCksCalc* XrdCksCalcmd5::New ( )
inlinevirtual

Get a new instance of the underlying checksum calculation object.

Returns
the checksum calculation object.

Implements XrdCksCalc.

References XrdCksCalcmd5().

const char* XrdCksCalcmd5::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 myDigest.

void XrdCksCalcmd5::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 MD5Update().

Member Data Documentation

MD5Context XrdCksCalcmd5::myContext
private

Referenced by Current(), Final(), Init(), and MD5Update().

unsigned char XrdCksCalcmd5::myDigest[16]
private

Referenced by Final(), and Type().


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