|
xrootd
|
#include <XrdCksCalc.hh>

Public Member Functions | |
| virtual char * | Calc (const char *Buff, int BLen) |
| virtual char * | Current () |
| virtual char * | Final ()=0 |
| virtual void | Init ()=0 |
| virtual XrdCksCalc * | New ()=0 |
| virtual void | Recycle () |
| Recycle the checksum object as it is no longer needed. A default is given. More... | |
| virtual const char * | Type (int &csSize)=0 |
| virtual void | Update (const char *Buff, int BLen)=0 |
| XrdCksCalc () | |
| Constructor. More... | |
| virtual | ~XrdCksCalc () |
| Destructor. More... | |
This class defines the interface to a checksum computation. When this class is used to define a plugin computation, the initial XrdCksCalc computation object is created by the XrdCksCalcInit() function defined at the end of this file.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Calculate a one-time checksum. The obvious default implementation is provided and assumes that Init() may be called more than once.
| Buff | -> Data to be checksummed. |
| BLen | -> Length of the data in Buff. |
|
inlinevirtual |
Get the current binary checksum value (defaults to final). However, the final checksum result is not affected.
Reimplemented in XrdCksCalcmd5.
References Final().
|
pure virtual |
Get the actual checksum in binary format.
Implemented in XrdCksCalcadler32, XrdCksCalczcrc32, XrdCksCalcmd5, and XrdCksCalccrc32.
Referenced by XrdCksManager::Calc(), Calc(), XrdCl::CheckSumManager::Calculate(), Current(), doCp_loc2xrd(), and doCp_xrd2loc().
|
pure virtual |
Initializes data structures (must be called by constructor). This is always called to reuse the object for a new checksum.
Implemented in XrdCksCalcadler32, XrdCksCalczcrc32, XrdCksCalccrc32, and XrdCksCalcmd5.
|
pure virtual |
Get a new instance of the underlying checksum calculation object.
Implemented in XrdCksCalcadler32, XrdCksCalczcrc32, XrdCksCalccrc32, and XrdCksCalcmd5.
Referenced by XrdCksManager::Calc(), XrdCl::CheckSumManager::GetCalculator(), XrdCksLoader::Load(), and XrdCksManager::Object().
|
inlinevirtual |
Recycle the checksum object as it is no longer needed. A default is given.
Referenced by XrdCksManager::Calc(), XrdCksLoader::~XrdCksLoader(), and XrdCksManager::~XrdCksManager().
|
pure virtual |
Get the checksum object algorithm name and the number bytes (i.e. size) required for the checksum value.
| csSize | -> Parameter to hold the size of the checksum value. |
Implemented in XrdCksCalcadler32, XrdCksCalczcrc32, XrdCksCalccrc32, and XrdCksCalcmd5.
Referenced by XrdCl::CheckSumManager::Calculate(), XrdCksManager::Config(), XrdCksManager::Find(), and XrdCksManager::Init().
|
pure virtual |
Compute a running checksum. This method may be called repeatedly for data segments; with Final() returning the full checksum.
| Buff | -> Data to be checksummed. |
| BLen | -> Length of the data in Buff. |
Implemented in XrdCksCalcadler32, XrdCksCalczcrc32, XrdCksCalccrc32, and XrdCksCalcmd5.
Referenced by Calc(), XrdCksManager::Calc(), XrdCl::CheckSumManager::Calculate(), doCp_loc2xrd(), and doCp_xrd2loc().
1.8.3.1