For Gauche 0.9.5

Next: , Previous: , Up: Library modules - Utilities   [Contents][Index]

12.40 rfc.sha - SHA message digest

Module: rfc.sha

This module implements US Secure Hash Algorithm defined in RFC 4634. It provides SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 (the latter four are sometimes referred as SHA-2 collectively).

The module extends util.digest (see Message digester framework).

Module: rfc.sha1

This is the old module that provided only SHA-1. It is kept as an alias of rfc.sha for the backward compatibility. New code should use rfc.sha.

Class: <sha1>
Class: <sha224>
Class: <sha256>
Class: <sha384>
Class: <sha512>

An instance of these class keeps internal state of SHA digest algorithm.

This class implements util.digest framework interface, digest-update!, digest-final!, digest, and digest-string. See Message digester framework, for detailed explanation of these methods.

Besides the digester framework, this module provides to short-cut procedures.

Function: sha1-digest
Function: sha224-digest
Function: sha256-digest
Function: sha384-digest
Function: sha512-digest

Reads data from the current input port until EOF, and returns its digest in an incomplete string.

Function: sha1-digest-string string
Function: sha224-digest-string string
Function: sha256-digest-string string
Function: sha384-digest-string string
Function: sha512-digest-string string

Digest the data in string, and returns the result in an incomplete string.

Next: , Previous: , Up: Library modules - Utilities   [Contents][Index]