NAME

String::CRC::Cksum - Perl extension for calculating checksums in a manner compatible with the POSIX cksum program.

SYNOPSIS

use String::CRC::Cksum qw(cksum);

my $cksum = cksum($string);

my ($cksum, $size) = cksum($string);

my $cksum = cksum(*FILE);

my ($cksum, $size) = cksum(*FILE);

There is plenty of scope for a Cksum object which can be fed data repeatedly and then yields the sum when asked. However, that will have to wait for some other 60 seconds...

DESCRIPTION

The String::CRC::Cksum module calculates a 32 bit CRC. It generates the same CRC value as the POSIX cksum program. If called in a list context, returns the length of the data object as well, which is useful for fully emulating the cksum program.

Despite its name, this module is able to compute the checksum of files as well as of strings.

Beware: consider proper use of binmode() if you are on a non-UNIX platform or processing files derived from other platforms.

EXPORT

None by default.

SEE ALSO

manpages: cksum(1) or cksum(C) depending on your flavour of UNIX.

http://www.opengroup.org/onlinepubs/007904975/utilities/cksum.html

AUTHOR

Andrew Hamm, <ahamm@cpan.org>.

COPYRIGHT AND LICENSE

Copyright disclaimed 2003 by Andrew Hamm

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Since I collected the algorithm from the Open Group web pages, they might have some issues but I doubt it. Let better legal minds than mine determine the issues if you need. [hopefully the CPAN and PAUSE administrators will understand the issues better, and will replace this entire section with something reasonable - hint hint.]