C++
C++
Example: Crypt2.CrcBd method
Demonstrates how to call the CrcBd method.Chilkat C++ Downloads
#include <CkCrypt2.h>
#include <CkBinData.h>
void ChilkatSample(void)
{
CkCrypt2 crypt;
CkBinData bd;
bd.AppendString("123456789","us-ascii");
unsigned long crc32 = crypt.CrcBd("crc-32",bd);
// The decimal value is 3421780262 (converted to hex is 0xCBF43926)
std::cout << crc32 << "\r\n";
unsigned long crc8 = crypt.CrcBd("crc8",bd);
std::cout << crc8 << "\r\n";
}