checksums.h man page

checksums.h —

Synopsis

#include <stddef.h>
#include 'io.h'

Functions

char * dmlite_checksum_full_name (const char *shortName, char *output, size_t osize)
Puts into output the full name of the checksum algorithm specified with shortName.
char * dmlite_checksum_short_name (const char *longName, char *output, size_t osize)
Puts into output the short name of the checksum algorithm specified with longName.
int dmlite_checksum_md5 (dmlite_fd *fd, off_t offset, off_t size, char *output, size_t outsize)
Generated the MD5 checksum of the given file.
int dmlite_checksum_crc32 (dmlite_fd *fd, off_t offset, off_t size, char *output, size_t outsize)
Generated the CRC32 checksum of the given file.
int dmlite_checksum_adler32 (dmlite_fd *fd, off_t offset, off_t size, char *output, size_t outsize)
Generated the Adler32 checksum of the given file.

Function Documentation

int dmlite_checksum_adler32 (dmlite_fd * fd, off_t offset, off_t size, char * output, size_t outsize)

Generated the Adler32 checksum of the given file.

Parameters:

fd The file descriptor where to read the data to digest.
offset Where to start to digest.
size The number of bytes to digest. 0 means the whole file.
output Where to put the resulting checksum (in hexadecimal)
outsize The size of the memory area pointed by output.

Returns:

0 on success, error code otherwise.

int dmlite_checksum_crc32 (dmlite_fd * fd, off_t offset, off_t size, char * output, size_t outsize)

Generated the CRC32 checksum of the given file.

Parameters:

fd The file descriptor where to read the data to digest.
offset Where to start to digest.
size The number of bytes to digest. 0 means the whole file.
output Where to put the resulting checksum (in decimal)
outsize The size of the memory area pointed by output.

Returns:

0 on success, error code otherwise.

char* dmlite_checksum_full_name (const char * shortName, char * output, size_t osize)

Puts into output the full name of the checksum algorithm specified with shortName.

Parameters:

shortName The checksum short name (CS, AD, MD)
output The full name will be put here.
osize The size of the buffer pointed by output.

Returns:

The same value as the pointer output

int dmlite_checksum_md5 (dmlite_fd * fd, off_t offset, off_t size, char * output, size_t outsize)

Generated the MD5 checksum of the given file.

Parameters:

fd The file descriptor where to read the data to digest.
offset Where to start to digest.
size The number of bytes to digest. 0 means the whole file.
output Where to put the resulting checksum (in hexadecimal)
outsize The size of the memory area pointed by output.

Returns:

0 on success, error code otherwise.

char* dmlite_checksum_short_name (const char * longName, char * output, size_t osize)

Puts into output the short name of the checksum algorithm specified with longName.

Parameters:

shortName The checksum long name (MD5, ADLER32, ...)
output The short name will be put here.
osize The size of the buffer pointed by output.

Returns:

The same value as the pointer output

Author

Generated automatically by Doxygen for dmlite from the source code.

Info

Fri Sep 23 2016 Version 0.6 dmlite