14 #include "mchecksum_config.h"
18 #define MCHECKSUM_OBJECT_NULL ((mchecksum_object_t)0)
20 #define MCHECKSUM_NOFINALIZE 0
21 #define MCHECKSUM_FINALIZE 1
66 MCHECKSUM_EXPORT
size_t
MCHECKSUM_EXPORT int mchecksum_update(mchecksum_object_t checksum, const void *data, size_t size)
Accumulates a partial checksum of the input data.
MCHECKSUM_EXPORT size_t mchecksum_get_size(mchecksum_object_t checksum)
Get size of checksum.
void * mchecksum_object_t
MCHECKSUM_EXPORT int mchecksum_reset(mchecksum_object_t checksum)
Reset the checksum.
MCHECKSUM_EXPORT int mchecksum_init(const char *hash_method, mchecksum_object_t *checksum)
Initialize the checksum with the specified hash method.
MCHECKSUM_EXPORT int mchecksum_destroy(mchecksum_object_t checksum)
Destroy the checksum.
MCHECKSUM_EXPORT int mchecksum_get(mchecksum_object_t checksum, void *buf, size_t size, int finalize)
Get checksum and copy it into buf.