Sample code for 30+ languages & platforms
Perl

Example: Crypt2.CrcBd method

Demonstrates how to call the CrcBd method.

Chilkat Perl Downloads

Perl
use chilkat();

$crypt = chilkat::CkCrypt2->new();

$bd = chilkat::CkBinData->new();
$bd->AppendString("123456789","us-ascii");

$crc32 = $crypt->CrcBd("crc-32",$bd);
# The decimal value is 3421780262 (converted to hex is 0xCBF43926)
print $crc32 . "\r\n";

$crc8 = $crypt->CrcBd("crc8",$bd);
print $crc8 . "\r\n";