XRootD
Loading...
Searching...
No Matches
XrdCksCalccrc32C.cc
Go to the documentation of this file.
2
3/*
4 C++ implementation of CRC-32C checksums based upon
5 unattributed library functions.
6
7 This file contains:
8 functions implementing the methods of the XrdCksCalc class
9
10 Provided by:
11 Anton Schwarz
12 University of Heidelberg
13 July 26, 2021
14
15 Status:
16 Public Domain
17
18*/
19
20void XrdCksCalccrc32C::Update(const char *Buff, int BLen)
21{
22 C32CResult = (unsigned int)XrdOucCRC::Calc32C(Buff, BLen, C32CResult);
23}
24
25const char *XrdCksCalccrc32C::Type(int &csSz)
26{
27 csSz = sizeof(TheResult);
28 return "crc32c";
29}
30
32
34{
35 C32CResult = C32C_XINIT;
36}
37
39{
40 TheResult = C32CResult;
41#ifndef Xrd_Big_Endian
42 TheResult = htonl(TheResult);
43#endif
44 return (char *)&TheResult;
45}
46
48
XrdCksCalc()
Constructor.
const char * Type(int &csSz)
virtual ~XrdCksCalccrc32C()
void Update(const char *Buff, int BLen)
XrdCksCalc * New()
static uint32_t Calc32C(const void *data, size_t count, uint32_t prevcs=0)
Definition XrdOucCRC.cc:190