Unix/Linux Go Back    

RedHat 9 (Linux i386) - man page for crc32 (redhat section n)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

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

       crc32 - Perform a 32bit Cyclic Redundancy Check

       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

       This  package provides a Tcl-only implementation of the CRC-32 algorithm based upon infor-
       mation provided at http://www.naaccr.org/standard/crc32/document.html If the  Trf  package
       is available then the crc-zlib command is used to perform the calculation.

       ::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 calcu-
	      lated using the CRC-32 algorithm. The result is formatted using the format(n) spec-
	      ifier provided or as an unsigned integer (%u) by default.

       -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 implementation.

       -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.

       % crc::crc32 "Hello, World!"

       % crc::crc32 -format 0x%X "Hello, World!"

       % crc::crc32 -file crc32.tcl

       sum(n), cksum(n)

       Pat Thoyts

       cksum, checksum, crc, crc32, cyclic redundancy check, data integrity, security

crc					       1.0					 crc32(n)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:21 PM.