1CRC32(3)              User Contributed Perl Documentation             CRC32(3)
2
3
4

NAME

6       String::CRC32 - Perl interface for cyclic redundancy check generation
7

SYNOPSIS

9           use String::CRC32;
10
11           $crc = crc32("some string");
12           $crc = crc32("some string", initvalue);
13
14           $somestring = "some string";
15           $crc = crc32($somestring);
16
17           open my $fh, '<', 'location/of/some.file' or die $!;
18           binmode $fh;
19           $crc = crc32($fh);
20           close $fh;
21

DESCRIPTION

23       The CRC32 module calculates CRC sums of 32 bit lengths.  It generates
24       the same CRC values as ZMODEM, PKZIP, PICCHECK and many others.
25
26       Despite its name, this module is able to compute the checksum of files
27       as well as strings.
28

EXAMPLES

30           $crc = crc32("some string");
31
32       results in the same as
33
34           $crc = crc32(" string", crc32("some"));
35
36       This is useful for subsequent CRC checking of substrings.
37
38       You may even check files:
39
40           open my $fh, '<', 'location/of/some.file' or die $!;
41           binmode $fh;
42           $crc = crc32($fh);
43           close $fh;
44
45       A init value may also have been supplied in the above example.
46

AUTHOR

48       Soenke J. Peters <peters__perl@opcenter.de>
49
50       Current maintainer: LEEJO
51
52       Address bug reports and comments to:
53       <https://github.com/leejo/string-crc32/issues>
54

LICENSE

56       CRC algorithm code taken from CRC-32 by Craig Bruce.  The module stuff
57       is inspired by a similar perl module called String::CRC by David
58       Sharnoff & Matthew Dillon.  Horst Fickenscher told me that it could be
59       useful to supply an init value to the crc checking function and so I
60       included this possibility.
61
62       The author of this package disclaims all copyrights and releases it
63       into the public domain.
64
65
66
67perl v5.30.0                      2019-07-26                          CRC32(3)
Impressum