Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cde6e58eac |
11
hmac.egg
Normal file
11
hmac.egg
Normal file
@@ -0,0 +1,11 @@
|
||||
; author: Thomas Hintz
|
||||
; email: t@thintz.com
|
||||
; license: bsd
|
||||
|
||||
((license "BSD")
|
||||
(category crypt)
|
||||
(dependencies message-digest)
|
||||
(test-dependencies test sha1 string-utils)
|
||||
(author "Thomas Hintz")
|
||||
(synopsis "HMAC provides a HMAC using the message-digest interface.")
|
||||
(components (extension hmac)))
|
||||
@@ -1,6 +1,4 @@
|
||||
(repo git "git://github.com/ThomasHintz/chicken-scheme-{egg-name}.git") ; optional
|
||||
|
||||
(uri targz "https://github.com/ThomasHintz/chicken-scheme-{egg-name}/tarball/{egg-release}")
|
||||
(uri targz "https://code.thintz.com/chicken-scheme-{egg-name}/snapshot/chicken-scheme-{egg-name}-{egg-release}.tar.gz")
|
||||
(release "1")
|
||||
(release "2")
|
||||
(release "3")
|
||||
@@ -8,4 +6,5 @@
|
||||
(release "6")
|
||||
(release "7")
|
||||
(release "7.0.1")
|
||||
(release "7.1.0")
|
||||
(release "7.1.0")
|
||||
(release "7.2.0")
|
||||
|
||||
2
hmac.release-info.chicken-5
Normal file
2
hmac.release-info.chicken-5
Normal file
@@ -0,0 +1,2 @@
|
||||
(uri targz "https://code.thintz.com/chicken-scheme-{egg-name}/snapshot/chicken-scheme-{egg-name}-{egg-release}.tar.gz")
|
||||
(release "7.2.0")
|
||||
14
hmac.scm
14
hmac.scm
@@ -5,8 +5,18 @@
|
||||
(module hmac
|
||||
(hmac hmac-primitive)
|
||||
|
||||
(import scheme chicken srfi-13)
|
||||
(use message-digest-basic message-digest-item message-digest-update-item)
|
||||
(import scheme)
|
||||
|
||||
(cond-expand
|
||||
|
||||
(chicken-4
|
||||
(import chicken srfi-13)
|
||||
(use message-digest-basic message-digest-item message-digest-update-item))
|
||||
|
||||
(chicken-5
|
||||
(import (chicken base) (chicken bitwise) srfi-13)
|
||||
(import message-digest-basic message-digest-item message-digest-update-item)))
|
||||
|
||||
|
||||
(define (hmac-primitive key digest-primitive)
|
||||
(let ((block-size (message-digest-primitive-block-length digest-primitive))
|
||||
|
||||
@@ -11,5 +11,4 @@
|
||||
; Files to install for your extension:
|
||||
'("hmac.o" "hmac.so" "hmac.import.so")
|
||||
; Assoc list with properties for your extension:
|
||||
'((version 7.1.0)
|
||||
(static "hmac.o"))) ;; for static linking
|
||||
'((static "hmac.o"))) ;; for static linking
|
||||
|
||||
@@ -2,8 +2,16 @@
|
||||
; email: t@thintz.com
|
||||
; license: bsd
|
||||
|
||||
(use test)
|
||||
(use sha1 string-utils hmac)
|
||||
(cond-expand
|
||||
|
||||
(chicken-4
|
||||
(use test)
|
||||
(use sha1 string-utils hmac))
|
||||
|
||||
(chicken-5
|
||||
(import test)
|
||||
(import sha1 string-hexadecimal hmac)))
|
||||
|
||||
|
||||
(test-group "RFC2202 test vectors"
|
||||
(define (testv key msg expected)
|
||||
|
||||
Reference in New Issue
Block a user