Digest::CRC(3pm)

Digest::CRC3pm

Generic crc functions

Usage

  # Functional style
  use Digest::CRC qw(crc64 crc32 crc16 crcccitt crc crc8 crcopenpgparmor);
  $crc = crc64("123456789");
  $crc = crc32("123456789");
  $crc = crc16("123456789");
  $crc = crcccitt("123456789");
  $crc = crc8("123456789");
  $crc = crcopenpgparmor("123456789");
  $crc = crc($input,$width,$init,$xorout,$refout,$poly,$refin,$cont);
  # add data to existing
  $crc = crc32("ABCD", $crc);
  # OO style
  use Digest::CRC;
  $ctx = Digest::CRC->new(type=>"crc16");
  $ctx = Digest::CRC->new(width=>16, init=>0x2345, xorout=>0x0000, 
                          refout=>1, poly=>0x8005, refin=>1, cont=>1);
  $ctx->add($data);
  $ctx->addfile(*FILE);
  $digest = $ctx->digest;
  $digest = $ctx->hexdigest;
  $digest = $ctx->b64digest;

Overview

The Digest::CRC module calculates CRC sums of all sorts. It contains wrapper functions with the correct parameters for CRC-CCITT, CRC-16, CRC-32 and CRC-64, as well as the CRC used in OpenPGP's ASCII-armored checksum.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 9 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Author

Oliver Maul, [email protected]

From libdigest-crc-perl 0.24-1+b4 in Debian 13 (Trixie). Parsed by carta from the page's man source.