summaryrefslogtreecommitdiff
path: root/hmac.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'hmac.rkt')
-rw-r--r--hmac.rkt5
1 files changed, 4 insertions, 1 deletions
diff --git a/hmac.rkt b/hmac.rkt
index 314ab88..b618537 100644
--- a/hmac.rkt
+++ b/hmac.rkt
@@ -36,7 +36,7 @@
[ipad (make-bytes blocksize #x36)]
[padded-key
(pad-bytes (if (> (bytes-length key) blocksize)
- (integer->bytes (hashfn key))
+ (integer->bytes (hashfn key) 'big-endian)
key)
blocksize
#x0
@@ -44,6 +44,7 @@
(hashfn (bytes-append (integer->bytes/size
(bitwise-xor (bytes->integer opad)
(bytes->integer padded-key))
+ 'big-endian
blocksize)
(integer->bytes/size
(hashfn
@@ -51,8 +52,10 @@
(integer->bytes/size
(bitwise-xor (bytes->integer ipad)
(bytes->integer padded-key))
+ 'big-endian
blocksize)
msg))
+ 'big-endian
hashsize)))))
;; According to Ironclad: