diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-08-16 15:14:52 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-08-16 15:14:52 +0200 |
commit | 93515cf43ce16974c7bef1d1d8332e3c8cfe6fac (patch) | |
tree | 84af96f2c50a933d94857d1563186c8bd66dadb7 /hmac.rkt | |
parent | 594c161d6e84581fb89873e216a70bd68a750919 (diff) |
Implement the Salsa20 stream cipher.
Diffstat (limited to 'hmac.rkt')
-rw-r--r-- | hmac.rkt | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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: |