| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
rfc.hmac - HMAC keyed-hashing This module implements HMAC algorithm, Keyed-hashing for message authentication, defined in RFC 2104.
For simple batched keyed hashing, you can use high-level API
hmac-digest and hmac-digest-string.
Or you can create <hmac> object and update its state
as the data coming in.
Keeps state information of HMAC algorithm.
Key and the hashing algorithm should be given at the construction
time, using :key and :hasher keyword-arguments respectively.
You can pass any class object that implements message digest
interface (See section util.digest - Message digester framework),
such as <md5> (See section rfc.md5 - MD5 message digest)
or <sha1> (See section rfc.sha1 - SHA1 message digest).
Example:
(make <hmac> :key (make-byte-string 16 #x0b) :hasher <md5>) |
Updates the internal state of hmac by data, which must be represented by a (possibly incomplete) string.
Finalizes the internal state of hmac and returns the
hashed string in incomplete string.
You can use digest-hexify
(See section util.digest - Message digester framework) to obtain "hexified"
result.
Once finalized, you can't call hmac-update! or hmac-final!
on hmac.
Creates an <hmac> object and hash the data stream
from the current input port, then returns the hashed result
in an incomplete string.
Creates an <hmac> object and hash the data in string,
then returns the hashed result in an incomplete string.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.