Perl
Chilkat2 Perl
Example: Crypt2.CrcBd method
Demonstrates how to call the CrcBd method.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $crypt = Chilkat2::Crypt2->new;
my $bd = Chilkat2::BinData->new;
$bd->AppendString('123456789', 'us-ascii');
my $crc32 = $crypt->CrcBd('crc-32', $bd);
# The decimal value is 3421780262 (converted to hex is 0xCBF43926)
print $crc32, "\n";
my $crc8 = $crypt->CrcBd('crc8', $bd);
print $crc8, "\n";