The available commands

Conversions commands
Message digests
Misc commands

First a small note: This manual deals with the tcl-level commands only. For a description of the C-level API please read the provided manpages or the C API chapter.

The behaviour of all transformations with respect to seeking is described on its own page.

All commands are available in 2 modes of operation, ``immediate'' and ``attached''. The generic syntactical forms of these modes are:


command -option <value> ... <sourcevalue>

In this mode the command processes the given <sourcevalue> and returns the transformed information as interpreter result. With tcl 7.6 this may yield incorrect results due to embedded \0 characters, either in source or result.

To allow for correct operation with this version too 2 additional options are provided: -in and -out.

If option -in is present, its argument is interpreted as channelhandle and the data to transform is read from it. A <sourcevalue> must not be specified in that case.

If option -out is present, its argument is interpreted as channelhandle and the transformation result will be written into it.

Please note that it is not necessary to specify both options, each of them can be used alone.


This mode is the one which required the patches to the older cores. Not so since version 8.2 of tcl. Without them we would be unable to stack our transforming channel onto the named one.

command -attach <channel> -option <value> ...

This creates a channel filter, configured as defined by the options and then attached to the <channel>. All data read from or written into the <channel> will be transformed accordingly from now on.

Neither -in nor -out nor a <sourcevalue> must be specified here.

Now a quick reference describing the available commands, their type of algorithm and location of implementation of the underlying algorithm.

Command Type Location

ascii85 Conversion trf
base64 Conversion trf
bin Conversion trf
hex Conversion trf
oct Conversion trf
quoted-printable Conversion trf
otp_words Conversion trf
uuencode Conversion trf

binio Binary I/O trf
rs_ecc Error correcting coder trf
transform General transformation trf
unstack - trf
zip Data compression zlib

Command Type Location

adler Message digest zlib
crc Message digest trf
crc-zlib Message digest zlib
haval Message digest trf
md2 Message digest SSLeay
md5 Message digest trf
otp_md5 Message digest trf
ripemd160 Message digest trf
ripemd128 Message digest trf
sha Message digest trf
sha1 Message digest SSLeay
otp_sha1 Message digest SSLeay

Transformers doing encryption are not available as part of this package, to avoid problems with the US export regulation. Please don't ask me to explain them.

Having said this I would like to mention the TrfCrypt package, which is an add-on to this extension providing the desired functionality.

© Andreas Kupries
Last update at Mon Aug 20 22:52:26 PDT 2001