Sample code for 30+ languages & platforms
C

Example: Crypt2.CrcFile method

Demonstrates how to call the CrcFile method.

Chilkat C Downloads

C
#include <C_CkCrypt2.h>

void ChilkatSample(void)
    {
    HCkCrypt2 crypt;
    const char *filePath;
    unsigned long crc32;
    unsigned long crc8;

    crypt = CkCrypt2_Create();

    filePath = "c:/temp/someFile.dat";

    crc32 = CkCrypt2_CrcFile(crypt,"crc-32",filePath);
    printf("%u\n",crc32);

    crc8 = CkCrypt2_CrcFile(crypt,"crc8",filePath);
    printf("%u\n",crc8);


    CkCrypt2_Dispose(crypt);

    }