Functions | |
std::string | fullChecksumName (const std::string &cs) |
std::string | shortChecksumName (const std::string &cs) |
std::string | md5 (IOHandler *io, off_t offset=0, off_t size=0) |
std::string | crc32 (IOHandler *io, off_t offset=0, off_t size=0) |
std::string | adler32 (IOHandler *io, off_t offset=0, off_t size=0) |
std::string | hexPrinter (const unsigned char *data, size_t nbytes) |
std::string | decPrinter (const unsigned char *data, size_t nbytes) |
std::string dmlite::checksums::adler32 | ( | IOHandler * | io, | |
off_t | offset = 0 , |
|||
off_t | size = 0 | |||
) |
Returns the Adler32 checksum of the data contained on the IO handler in hexadecimal format.
io | The IO handler to be digested. The read/write possition will be moved! | |
offset | Where to start to digest. | |
size | The number of bytes to digest. 0 means the whole file. |
std::string dmlite::checksums::crc32 | ( | IOHandler * | io, | |
off_t | offset = 0 , |
|||
off_t | size = 0 | |||
) |
Returns the CRC checksum of the data contained on the IO handler (as zlib crc32) in base 10 format.
io | The IO handler to be digested. The read/write possition will be moved! | |
offset | Where to start to digest. | |
size | The number of bytes to digest. 0 means the whole file. |
std::string dmlite::checksums::decPrinter | ( | const unsigned char * | data, | |
size_t | nbytes | |||
) |
Returns the decimal representation of the data, separated by spaces (num1 num2 num3)
data | The data to dump to decimal representation. | |
nbytes | The number of bytes in data |
std::string dmlite::checksums::fullChecksumName | ( | const std::string & | cs | ) |
To be used internally by the plug-ins that need to deal with the legacy-style stored checksums.
std::string dmlite::checksums::hexPrinter | ( | const unsigned char * | data, | |
size_t | nbytes | |||
) |
Returns the hexadecimal representation of the data
data | The data to dump to hexadecimal representation. | |
nbytes | The number of bytes in data |
std::string dmlite::checksums::md5 | ( | IOHandler * | io, | |
off_t | offset = 0 , |
|||
off_t | size = 0 | |||
) |
Returns the MD5 checksum of the data contained on the IO handler in hexadecimal format.
io | The IO handler to be digested. The read/write possition will be moved! | |
offset | Where to start to digest. | |
size | The number of bytes to digest. 0 means the whole file. |
std::string dmlite::checksums::shortChecksumName | ( | const std::string & | cs | ) |
Inverse of fullChecksumName This should eventually disappear, once the backends can deal with full checksum names.