Table of Contents

_________________________________________________________________

Name

::sha1::sha1 - Perform sha1 hashing

Synopsis

package require Tcl 8.2

package require sha1 ?1.0.1?

::sha1::sha1 msg?

::sha1::hmac key text

_________________________________________________________________

Description

This package provides commands to compute a SHA1 digests of arbitrary messages.

Commands

::sha1::sha1 msg
The command takes a message and returns the SHA1 digest of this message as a hexadecimal string.

::sha1::hmac key text
The command takes a key string and a text and returns the hmac of the text under the chosen key as a hexadecimal string.

Examples

% sha1::sha1 «hello world"
2aae6c35c94fcfb415dbe95f408b9ce91ee846ed

% sha1::hmac «our little secret» «hello world" a7ed9d62819b9788e22171d9108a00c370104526

Keywords

sha1, hashing, security


Table of Contents