This package is an implementation in Tcl of the RIPEMD-160 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 160-bit message digest from the input. The RIPEMD-160
algorithm is based upon the MD4 algorithm (2, 4) but has been
cryptographically strengthened against weaknesses that have been found
in MD4 (4).

This package will use cryptkit or Trf to
accelerate the digest computation if either package is available. In
the absence of an accelerator package the pure-Tcl implementation will
be used.

Calculate the RIPEMD-160 digest of the data given in string. This is
returned as a binary string by default. Giving the -hex option
will return a hexadecimal encoded version of the digest.

The data to be hashed can be specified either as a string argument to
the ripemd160 command, or as a filename or a pre-opened channel. If the
-filename argument is given then the file is opened, the data read
and hashed and the file is closed. If the -channel argument is
given then data is read from the channel until the end of file. The
channel is not closed.

Calculate an Hashed Message Authentication digest (HMAC) using the
RIPEMD-160 digest algorithm. HMACs are described in RFC 2104 (5) and
provide a RIPEMD-160 digest that includes a key. All options other
than -key are as for the ::ripemd::ripemd160 command.

For the programmer, hash functions can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
uniquely derived from the data that was poured into the bucket. The
programming interface to the hash operates on a token (equivalent to the
bucket). You call RIPEMD160Init to obtain a token and then call
RIPEMD160Update as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
RIPEMD160Final. An equivalent set of functions gives you a keyed
digest (HMAC).

Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 16 bytes representing the 160 bit
RIPEMD-160 digest value.

This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category ripemd of the
Tcllib Trackers.
Please also report any ideas for enhancements you may have for either
package and/or documentation.

Note further that attachments are strongly preferred over
inlined patches. Attachments can be made by going to the Edit
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.