A very small Clojure library for protecting against timing attacks when comparing strings or sequences of bytes.
Add the following dependency to your
(require '[crypto.equality :as crypto])
Then use the
eq? function to compare strings, byte arrays, or any
ordered sequence of integers.
(crypto/eq? "foo" "foo") ;; => true (crypto/eq? "foo" "bar") ;; => false
Copyright © 2013 James Reeves
Distributed under the Eclipse Public License, the same as Clojure.