Yet another wrapper for RSA's MD5 message digest in C ===================================================== Rev 0.11: Fix filename typo Rev 0.10: Initial release This package defines a "md5c" command, which calculates the MD5 message digest. Its API is a bit unconventional in that it returns an object which can be treated as a 16-byte "string", but which can also be passed to the md5c command again as 2nd arg to progressively calculate an MD5. The simplest use is as follows: binary scan [md5c data] H* result puts "the result is: $result" To calculate md5c on a bunch of strings, say in a loop, you can do: set ctx [md5c ""] foreach x {aaa bbb ccc} { set ctx [md5c $x $ctx] } binary scan $ctx H* result puts "the result is: $result" Note that $ctx holds an object which is an intermediate MD5 "context", which can be used for further MD5 accumulation in successive calls. When a string representation is required, it is automatically finalized. Data is treated as binary, meaning that all input and output is going to be converted and treated as byte arrays in Tcl.