Version 2 of cksum

Updated 2002-01-16 09:55:22

A Tcl implementation of the cksum(1) command is now part of Tcllib and should end up in Tcllib 1.2.

The cksum(1) command calculates a 32 bit checksum of the input data using a POSIX standard algorithm and so should give the same result across multiple platforms (unlike the sum command). The Tcllib version uses the same algorithm and has been checked against the GNU and BSD cksum(1) commands.

More information about the unix command can be found at http://www.tac.eu.org/cgi-bin/man-cgi?cksum+1 or by referring to your system manual page.

For example:

  % package require cksum
  1.0
  % crc::cksum "Hello, World!"
  2609532967
  % crc::cksum -file cksum.tcl
  871033703
  % exec cksum cksum.tcl
  871033703 6652 cksum.tcl
  %

See the code at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcllib/tcllib/modules/crc/cksum.tcl?rev=HEAD&content-type=text/vnd.viewcvs-markup


Category Package subset Tcllib see also crc and sum