wiki:WikiStart
Last modified 4 years ago Last modified on 10/17/13 22:43:13

Welcome to the MChecksum trac site

What is MChecksum?

MChecksum is a generic checksum library. MChecksum is a submodule of Mercury.

Download

Using Git (Anonymous access):

git clone git://git.mcs.anl.gov/radix/mchecksum

Documentation

Usage Example

#include <mchecksum.h>

#define BUF_SIZE 512

int
main()
{
    mchecksum_object_t checksum;
    int buf[BUF_SIZE];
    void *hash;
    size_t hash_size;

    mchecksum_init("crc64", &checksum);

    mchecksum_update(checksum, buf, BUF_SIZE * sizeof(int));

    hash_size = mchecksum_get_size(checksum);

    hash = malloc(hash_size);

    mchecksum_get(checksum, hash, hash_size, MCHECKSUM_FINALIZE);

    mchecksum_destroy(checksum);

    free(hash);
}