GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRING::CRC32 (3)

.ds Aq ’

NAME

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

CONTENTS

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");
    binmode SOMEFILE;
    $crc = crc32(*SOMEFILE);
    close(SOMEFILE);



DESCRIPTION

The <B>CRC32B> 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");
    binmode SOMEFILE;
    $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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CRC32 (3) 2013-12-30

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.