#include <string>
#include <vector>
#include <time.h>
Go to the source code of this file.
Functions | |
std::vector< char > | XrdCksAttrData (const char *cstype, const char *csval, time_t mtime) |
std::string | XrdCksAttrName (const char *cstype, const char *nspfx="") |
std::string | XrdCksAttrValue (const char *cstype, const char *csbuff, int csblen) |
|
extern |
This header file defines linkages to various XRootD checksum assistants. The functions described here are located in libXrdUtils.so.
Generate the extended attribute data for a particular checksum that can be used to set the corresponding checksum attribute variable.
cstype | A null terminated string holding the checksum type (e.g. "adler32", "md5", "sha2", etc). |
csval | A null terminated string holding the corresonding checksum value. This must be an ASCII hex representation of the value and must be of appropriate length. |
mtime | The subject file's modification time. |
Definition at line 84 of file XrdCksAssist.cc.
References XrdCksData::csTime, XrdCksData::NameSize, and XrdCksData::Set().
|
extern |
Generate the extended attribute variable name for a particular checksum.
cstype | A null terminated string holding the checksum type (e.g. "adler32", "md5", "sha2", etc). |
nspfx | Is the namespace prefix to add to the variable name. By default no prefix os used. Certain platforms and/or filesystems require that user attributes start with a particular prefix (e.g. Linux requires 'user.') others do not. If your are going to use the variable name to get or set an attribute you should specify any required prefix. If specified and it does not end with a dot, a dot is automatically added to the nspfx. |
Definition at line 125 of file XrdCksAssist.cc.
References XrdCksData::NameSize.
|
extern |
Extract th checksum value from checksum extended attribute data.
cstype | A null terminated string holding the checksum type (e.g. "adler32", "md5", "sha2", etc). |
csbuff | A pointer to a buffer hlding the checksum data. |
csblen | The length of the checksum data (i.e. the length of the retrieved extended attribute). |
Definition at line 163 of file XrdCksAssist.cc.
References XrdCksData::Get(), XrdCksData::Length, XrdCksData::Name, XrdCksData::NameSize, and XrdCksData::ValuSize.