You are looking at historical revision 24332 of this page. It may differ significantly from its current revision.

HMAC

Description

Provides a basic and primitive hmac. From wikipedia: "In cryptography, HMAC (Hash-based Message Authentication Code) is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret key."

I would welcome improvements. This implementation is not very performant and could use better integration with the message digest system.

Author

Thomas Hintz

Contact me at t@thintz.com.

Requirements

List of Procedures

hmac

[procedure] (hmac key digest-primitive #!optional (block-size 64))

Takes key and digest-primitive and returns a function that takes message and produces an hmac.

Example

(use hmac sha1)

((hmac "secret-key" (sha1-primitive)) "message")

Version History

1

Initial release.