Skip to content
A small Clojure library for securely comparing strings or byte arrays
Clojure
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/crypto
test/crypto
.gitignore
README.md
project.clj

README.md

crypto-equality

A very small Clojure library for protecting against timing attacks when comparing strings or sequences of bytes.

Installation

Add the following dependency to your project.clj file:

[crypto-equality "0.1.0"]

Usage

Require the crypto.equality namespace:

(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

License

Copyright © 2013 James Reeves

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.