From 93515cf43ce16974c7bef1d1d8332e3c8cfe6fac Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 16 Aug 2011 15:14:52 +0200 Subject: Implement the Salsa20 stream cipher. --- hmac.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hmac.rkt') 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: -- cgit v1.2.3