#!/usr/bin/perl use strict; use warnings; use Digest::CRC; my $crc = qq(f0b8); print qq(target crc =$crc\n); my $msg = qq(8792ebfe26cc130030c20011c89f23c8); $msg = pack( 'H32', $msg ); my $ctx = Digest::CRC->new(width=>16, init=>0xffff, xorout=>0xffff, refout=>0, poly=>0x8408, refin=>1, cont=>1); $ctx->add($msg); my $crc2 = $ctx->hexdigest; print qq( crc = $crc2\n);