String::CRC32 - Perl interface for cyclic redundency check generation


String-CRC32 documentation  | view source Contained in the String-CRC32 distribution.

Index


NAME

Top

String::CRC32 - Perl interface for cyclic redundency check generation

SYNOPSIS

Top

    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

Top

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

Top

    $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

Top

Soenke J. Peters <peters__perl@opcenter.de>

Please be so kind as to report any bugs/suggestions to the above address.

COPYRIGHT

Top


String-CRC32 documentation  | view source Contained in the String-CRC32 distribution.