Updating to work with CHICKEN 5.

Updated to work with CHICKEN 5. Thanks to Andy Bennett
<andyjpb@ashurst.eu.org> for doing most of the work!

Moved hmac.release-info* uri targz to point at code.thintz.com instead
of github.
master 7.2.0
Thomas Hintz 6 years ago
parent ae19b8a2a5
commit cde6e58eac

@ -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://code.thintz.com/chicken-scheme-{egg-name}/snapshot/chicken-scheme-{egg-name}-{egg-release}.tar.gz")
(uri targz "https://github.com/ThomasHintz/chicken-scheme-{egg-name}/tarball/{egg-release}")
(release "1") (release "1")
(release "2") (release "2")
(release "3") (release "3")
@ -8,4 +6,5 @@
(release "6") (release "6")
(release "7") (release "7")
(release "7.0.1") (release "7.0.1")
(release "7.1.0") (release "7.1.0")
(release "7.2.0")

@ -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")

@ -5,8 +5,18 @@
(module hmac (module hmac
(hmac hmac-primitive) (hmac hmac-primitive)
(import scheme chicken srfi-13) (import scheme)
(use message-digest-basic message-digest-item message-digest-update-item)
(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) (define (hmac-primitive key digest-primitive)
(let ((block-size (message-digest-primitive-block-length digest-primitive)) (let ((block-size (message-digest-primitive-block-length digest-primitive))

@ -11,5 +11,4 @@
; Files to install for your extension: ; Files to install for your extension:
'("hmac.o" "hmac.so" "hmac.import.so") '("hmac.o" "hmac.so" "hmac.import.so")
; Assoc list with properties for your extension: ; 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 ; email: t@thintz.com
; license: bsd ; license: bsd
(use test) (cond-expand
(use sha1 string-utils hmac)
(chicken-4
(use test)
(use sha1 string-utils hmac))
(chicken-5
(import test)
(import sha1 string-hexadecimal hmac)))
(test-group "RFC2202 test vectors" (test-group "RFC2202 test vectors"
(define (testv key msg expected) (define (testv key msg expected)

Loading…
Cancel
Save