Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
HMAC
TOC »
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."
Repository
https://github.com/ThomasHintz/chicken-scheme-hmac
Author
Contact me at t@thintz.com.
Requirements
List of Procedures
hmac
- hmac key digest-primitive #!optional (result-form 'string)procedure
Takes key and digest-primitive and returns a function that takes message and produces an hmac.
The result-form parameter may be used to change the format of the resulting hash, please refer to the message-digest documentation for more informations.
hmac-primitive
- hmac-primitive key digest-primitiveprocedure
Takes key and digest-primitive and returns a message-digest-primitive that calculates the HMAC with the parameters given.
Example
(use hmac sha1) ((hmac "secret-key" (sha1-primitive)) "message")
Version History
7.1.0
Rewritten as a message-digest primitive. Removed the block-size parameter as that's something specified by the hashing algorithm chosen.
7.0.1
The hmac procedure no longer destroys the input. Code cleanup and miscellaneous fixes.
7
Removed dependency on srfi-4-utils as it is GPL and hmac is BSD.
6
Fixed egg category (was cryptography, now crypt)
4
Forgot to update .setup to match version in .release-info
3
Fixed install dependency bug
2
...not sure...
1
Initial release.