see #7 Use refer instead of as

This commit is contained in:
liquidz 2014-09-01 07:31:43 +09:00
parent 637f871105
commit 289a9901f7

View file

@ -1,7 +1,7 @@
(ns clj-jwt.sign
(:require
[clj-jwt.base64 :refer [url-safe-encode-str url-safe-decode]]
[crypto.equality :as creq]))
[clj-jwt.base64 :refer [url-safe-encode-str url-safe-decode]]
[crypto.equality :refer [eq?]]))
(java.security.Security/addProvider
(org.bouncycastle.jce.provider.BouncyCastleProvider.))
@ -18,7 +18,7 @@
(defn- hmac-verify
"Function to verify data and signature with HMAC algorithm."
[alg key body signature & {:keys [charset] :or {charset "UTF-8"}}]
(creq/eq? signature (hmac-sign alg key body :charset charset)))
(eq? signature (hmac-sign alg key body :charset charset)))
; RSA
(defn- rsa-sign