source: project/wiki/eggref/4/hmac @ 34569

Last change on this file since 34569 was 34569, checked in by LemonBoy, 13 months ago

Update a bit the page

File size: 1.8 KB
Line 
1== HMAC
2
3[[toc:]]
4
5=== Description
6
7Provides a basic and primitive hmac. From [[https://secure.wikimedia.org/wikipedia/en/wiki/HMAC|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."
8
9=== Repository
10
11[[https://github.com/ThomasHintz/chicken-scheme-hmac]]
12
13=== Author
14
15[[/users/thomas-hintz|Thomas Hintz]]
16
17Contact me at t@thintz.com.
18
19=== Requirements
20
21* [[Message Digest]]
22
23=== List of Procedures
24
25==== {{hmac}}
26<procedure>(hmac key digest-primitive #!optional (result-form 'string))</procedure>
27
28Takes {{key}} and {{digest-primitive}} and returns a function that takes {{message}} and produces an hmac.
29
30The {{result-form}} parameter may be used to change the format of the resulting hash, please refer to the [[/eggref/4/message-digest|message-digest documentation]] for more informations.
31
32==== {{hmac-primitive}}
33<procedure>(hmac-primitive key digest-primitive)</procedure>
34
35Takes {{key}} and {{digest-primitive}} and returns a '''message-digest-primitive''' that calculates the HMAC with the parameters given.
36
37=== Example
38
39<enscript highlight=scheme>
40(use hmac sha1)
41
42((hmac "secret-key" (sha1-primitive)) "message")
43</enscript>
44
45=== Version History
46
47==== 7.1.0
48Rewritten as a '''message-digest''' primitive.
49Removed the {{block-size}} parameter as that's something specified by the hashing algorithm chosen.
50==== 7.0.1
51The '''hmac''' procedure no longer destroys the input.
52Code cleanup and miscellaneous fixes.
53==== 7
54Removed dependency on srfi-4-utils as it is GPL and hmac is BSD.
55==== 6
56Fixed egg category (was cryptography, now crypt)
57==== 4
58Forgot to update .setup to match version in .release-info
59==== 3
60Fixed install dependency bug
61==== 2
62...not sure...
63==== 1
64Initial release.
Note: See TracBrowser for help on using the repository browser.