Re: Checksum
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Checksum

From: Uwe Klein <uwe_klein_habertwedt@t-online.de>
Date: Thu Mar 02 2006 - 21:54:20 CET

Hi,
> set cks [cksum($data)]

don't do that tcl is not C

what about:

% package require crc16
% set data
        "\x00\x4d\x41\x49\x4e\x00\x00\x00\x00\x26\x00\x04\x05\x0f\
         \x09\x01\x06\xef\xf2\x01\xf2\xf3\x01\xf3\x54\x65\x73\x74\
         \x69\x6e\x67\x20\x31\x32\x33\xef"

% ::crc::crc16 $data
6800

G!
uwe
Received on Sun Apr 30 02:21:08 2006