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

  1. Outdated egg!
  2. HMAC
    1. Description
    2. Repository
    3. Author
    4. Requirements
    5. List of Procedures
      1. hmac
      2. hmac-primitive
    6. Example
    7. Version History
      1. 7.1.0
      2. 7.0.1
      3. 7
      4. 6
      5. 4
      6. 3
      7. 2
      8. 1

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

Thomas Hintz

Contact me at t@thintz.com.

Requirements

List of Procedures

hmac

[procedure] (hmac key digest-primitive #!optional (result-form 'string))

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

[procedure] (hmac-primitive key digest-primitive)

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.