Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

string::crc32(3) [centos man page]

CRC32(3)						User Contributed Perl Documentation						  CRC32(3)

NAME
String::CRC32 - Perl interface for cyclic redundency check generation 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"); $crc = crc32(*SOMEFILE); close(SOMEFILE); DESCRIPTION
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
$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
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. perl v5.16.3 2005-04-04 CRC32(3)

Check Out this Related Man Page

crc32(n)						  Cyclic Redundancy Check (crc32)						  crc32(n)

NAME
crc32 - Perform a 32bit Cyclic Redundancy Check SYNOPSIS
package require Tcl 8.2 package require crc32 ?1.0? ::crc::crc32 ?-format format? ?-seed value? ?-implementation procname? message ::crc::crc32 ?-format format? ?-seed value? ?-implementation procname? -filename file DESCRIPTION
This package provides a Tcl-only implementation of the CRC-32 algorithm based upon information provided at http://www.naaccr.org/stan- dard/crc32/document.html If the Trf package is available then the crc-zlib command is used to perform the calculation. COMMANDS
::crc::crc32 ?-format format? ?-seed value? ?-implementation procname? message ::crc::crc32 ?-format format? ?-seed value? ?-implementation procname? -filename file The command takes string data or a file name and returns a checksum value calculated using the CRC-32 algorithm. The result is for- matted using the format(n) specifier provided or as an unsigned integer (%u) by default. OPTIONS
-filename name Return a checksum for the file contents instead of for parameter data. -format string Return the checksum using an alternative format template. -seed value Select an alternative seed value for the CRC calculation. The default is 0xffffffff. This can be useful for calculating the CRC for data structures without first converting the whole structure into a string. The CRC of the previous member can be used as the seed for calculating the CRC of the next member. Note that as the Trf command crc-zlib cannot accept a seed value, use of this option will force the use of the Tcl only implementa- tion. -implementation procname This hook is provided to allow users to provide their own implementation (perhaps a C compiled extension) or to explicitly request use of the Tcl only implementation when Trf is installed (by setting -implementation crc::Crc32_tcl. The procedure specfied is called with two parameters. The first is the data to be checksummed and the second is the seed value. A 32bit integer is expected as the result. EXAMPLES
% crc::crc32 "Hello, World!" 3964322768 % crc::crc32 -format 0x%X "Hello, World!" 0xEC4AC3D0 % crc::crc32 -file crc32.tcl 483919716 SEE ALSO
sum(n), cksum(n) AUTHORS
Pat Thoyts KEYWORDS
cksum, checksum, crc, crc32, cyclic redundancy check, data integrity, security crc 1.0 crc32(n)
Man Page