[Explain essence.]
CRC is an acronym for Cyclic Redundancy Check [L1 ] [L2 ].
CRCs are available to Tcl programmers in several forms, including Andreas Kupries' Trf package. Pat Thoyts illustrates example manipulations which rely on this C-coded extension:
32 % package require Trf 2.1 33 % set chk [crc {Hello, World!}] <funny chars> 34 % binary scan $chk h* chkx 1 35 % set chkx fdb8ec 37 % binary format h* $chkx <funny chars>
Note that the [hex] command in Trf can be used to perform the same conversions. Here is the example from above recast to use [hex].
32 % package require Trf 2.1 33 % set chk [crc {Hello, World!}] <funny chars> 34 % set chkx [hex -mode encode -- $chk] fdb8ec 37 % hex -mode decode -- $chkx <funny chars>
[Give reference to pure-Tcl implementation.]