rhash command
Not logged in

rhash command

Name

rhash - Interface to librhash similar to Andreas Kupries' ANKH package

Synopsis

package require rhash
rhash option ?arg ...?

Description

This command provides several operations to interface with the librhash hashing library. option indicates which operation to carry out. Any unique abbreviation for option is acceptable. The valid options are:

rhash list

Returns a list with the names of available hash algorithms, currently these are aich, blake2b, blake2s, btih, ed2k, edonr/224, edonr/256, edonr/384, edonr/512, gost12/256, gost12/512, gost94, has160, md4, md5, ripemd160, snefru/128, snefru/256, sha1, sha2/224, sha2/256, sha2/384, sha2/512, sha3/224, sha3/256, sha3/384, sha3/512, tiger, tth, and whirlpool.

rhash size hashname

Returns the size of the hash value in bytes given the hash algorithm hashname.

rhash hash hashname file filename ?options?

Returns a byte array using the hash algorith hashname by computing the hash value of the file filename which is opened for reading and finally closed. The optional parameters in options can be -offset number for the start offset in the file, and -length number for the number of bytes to process. If no options are specified, the entire file is processed.

rhash hash hashname channel chan ?options?

Returns a byte array using the hash algorith hashname by computing the hash value of the open channel chan which must be open for reading. For the optional parameters options, the same rules as in the file processing variant are used.

rhash hash hashname string data ?options?

Returns a byte array using the hash algorith hashname by computing the hash value on the byte array data. For the optional parameters options, the same rules as in the file processing variant are used.