CRC32(3pm) User Contributed Perl Documentation CRC32(3pm)NAME
String::CRC32 - Perl interface for cyclic redundency check generation
SYNOPSIS
use String::CRC32;
$crc = crc32("some string");
$crc = crc32("some string", initvalue);
$somestring = "some string";
$crc = crc32($somestring);
open(SOMEFILE, "location/of/some.file");
$crc = crc32(*SOMEFILE);
close(SOMEFILE);
DESCRIPTION
The CRC32 module calculates CRC sums of 32 bit lenghts. It generates the same CRC values as ZMODEM, PKZIP, PICCHECK and many others.
Despite its name, this module is able to compute the checksum of files as well as strings.
EXAMPLES
$crc = crc32("some string");
results in the same as
$crc = crc32(" string", crc32("some"));
This is useful for subsequent CRC checking of substrings.
You may even check files:
open(SOMEFILE, "location/of/some.file");
$crc = crc32(*SOMEFILE);
close(SOMEFILE);
A init value may also been supplied in the above example.
AUTHOR
Soenke J. Peters <peters__perl@opcenter.de>
Please be so kind as to report any bugs/suggestions to the above address.
COPYRIGHT
CRC algorithm code taken from CRC-32 by Craig Bruce. The module stuff is inspired by a similar perl module called String::CRC by David
Sharnoff & Matthew Dillon. Horst Fickenscher told me that it could be useful to supply an init value to the crc checking function and so I
included this possibility.
The author of this package disclaims all copyrights and releases it into the public domain.
perl v5.14.2 2005-04-04 CRC32(3pm)
Check Out this Related Man Page
Digest::CRC(3pm) User Contributed Perl Documentation Digest::CRC(3pm)NAME
Digest::CRC - Generic CRC functions
SYNOPSIS
# 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;
DESCRIPTION
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.
SEE ALSO
https://tools.ietf.org/html/rfc4880#section-6
AUTHOR
Oliver Maul, oli@42.nu
COPYRIGHT
CRC algorithm code taken from "A PAINLESS GUIDE TO CRC ERROR DETECTION
ALGORITHMS".
The author of this package disclaims all copyrights and releases it into the public domain.
perl v5.14.2 2011-11-12 Digest::CRC(3pm)
there is a message crc error when i install rethat 7.1
what is these message means ?
And why is my harddisk drive detected as hdc not hda ??
please do reply if you have any idea or guesses .
thanking you all
systen config :
intel P4
intel 845
256 SD
... (1 Reply)
What do u do here?my cousin told me to check this out but im not sure what im doing :confused: :( camron if your on please help me!!!!!!!!!!!!!!! (1 Reply)
Hi,
I need to search one file based on the entry from another;
eg.
file1 has entries;
45654
34768
12345
File2 has entries
23234 somestring 4312
45654 somestring 34768
12345 somestring 45654
so I need to pick first entry in file1 which eg. '45654' and... (8 Replies)
hello,
I have implemented a 32bit crc generation algorithm. Now at the receiver side i need to check the crc for that....i need to add the message in the packet and the crc and divide it with the key common at both side and the remainder should be zero.
now how to add crc which is hexadecimal... (4 Replies)
Please excuse my ineptitude for a bit as I've been spoiled for the past few months with only writing perl code instead of C.
So ok, I've been thinking about some code to change the crc32 values that are held within central directory headers of zip files.
Because I'm lazy I decided to just... (3 Replies)
Good Evening,
I started working on the 17x17 4-colouring challenge, and I ran into a bit of an I/O snag.
It was an enormous headache to detect the differences in very similar 289-char strings.
Eventually, it made more sense to associate a CRC-Digest with each colouring.
After learning... (0 Replies)
Is cksum the right command to calculate the crc32 checksum value? I tried it for a number of files now and every time the results dont match. So there is nothing wrong with the file. Also, cksum gives me an all numerical value while crc32 is alpha numeric. What am I doing wrong?
Thanks (9 Replies)
I would like to list all files in a directory tree but with a prepended digest hash code (like CRC32). CRC32 is not a MUST. If suitable another hash code can be used as well. In case of CRC32 the listing should look like
3765AC \usr\bin\spool
23CE99 \usr\bin\spool\list.h
...
11AA04... (3 Replies)