1Crypt::Checksum::CRC32(U3s)er Contributed Perl DocumentatCiroynpt::Checksum::CRC32(3)
2
3
4

NAME

6       Crypt::Checksum::CRC32 - Compute CRC32 checksum
7

SYNOPSIS

9          use Crypt::Checksum::CRC32;
10
11          $d = Crypt::Checksum::CRC32->new;
12          $d->add('any data');
13          $d->addfile('filename.dat');
14          $d->addfile(*FILEHANDLE);
15          $checksum_raw = $d->digest;     # raw bytes
16          $checksum_hex = $d->hexdigest;  # hexadecimal form
17

DESCRIPTION

19       Calculating CRC32 checksums (OO interface);
20
21       Since: CryptX-0.032
22

METHODS

24   new
25       Constructor, returns a reference to the checksum object.
26
27        $d = Crypt::Checksum::CRC32->new;
28
29   clone
30       Creates a copy of the checksum object state and returns a reference to
31       the copy.
32
33        $d->clone();
34
35   reset
36       Reinitialize the checksum object state and returns a reference to the
37       checksum object.
38
39        $d->reset();
40
41   add
42       All arguments are appended to the message we calculate checksum for.
43       The return value is the checksum object itself.
44
45        $d->add('any data');
46        #or
47        $d->add('any data', 'more data', 'even more data');
48
49   addfile
50       The content of the file (or filehandle) is appended to the message we
51       calculate checksum for.  The return value is the checksum object
52       itself.
53
54        $d->addfile('filename.dat');
55        #or
56        $d->addfile(*FILEHANDLE);
57
58       BEWARE: You have to make sure that the filehandle is in binary mode
59       before you pass it as argument to the addfile() method.
60
61   digest
62       Returns the binary checksum (raw bytes).
63
64        $result_raw = $d->digest();
65
66   hexdigest
67       Returns the checksum encoded as a hexadecimal string.
68
69        $result_hex = $d->hexdigest();
70

SEE ALSO

72       •   CryptX, Crypt::Checksum
73
74       •   <https://en.wikipedia.org/wiki/Cyclic_redundancy_check>
75
76
77
78perl v5.34.0                      2021-07-22         Crypt::Checksum::CRC32(3)
Impressum