diff --git a/README.md b/README.md index 640bc35..18afeee 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,34 @@ # crypto-equality -A Clojure library designed to ... well, that part is up to you. +A very small Clojure library for protecting against +[timing attacks][1] when comparing strings or sequences of bytes. + +[1]: https://en.wikipedia.org/wiki/Timing_attack + +## Installation + +Add the following dependency to your `project.clj` file: + + [crypto-equality "0.1.0-SNAPSHOT"] ## Usage -FIXME +Require the `crypto.equality` namespace: + +```clojure +(require '[crypto.equality :as crypto]) +``` + +Then use the `eq?` function to compare strings, byte arrays, or any +ordered sequence of integers. + +```clojure +(crypto/eq? "foo" "foo") ;; => true +(crypto/eq? "foo" "bar") ;; => false +``` ## License -Copyright © 2013 FIXME +Copyright © 2013 James Reeves -Distributed under the Eclipse Public License either version 1.0 or (at -your option) any later version. +Distributed under the Eclipse Public License, the same as Clojure.