Permalink
Browse files

Remove contrib dependencies from ring.m.session.cookie.

  • Loading branch information...
1 parent de1d4f4 commit 7eb669c8b334c20462091ce1bb67482e6161cf55 @mmcgrana committed Oct 26, 2010
Showing with 14 additions and 11 deletions.
  1. +14 −11 ring-core/src/ring/middleware/session/cookie.clj
View
25 ring-core/src/ring/middleware/session/cookie.clj
@@ -1,23 +1,26 @@
(ns ring.middleware.session.cookie
"Encrypted cookie session storage."
- (:use [clojure.contrib.def :only (defvar-)]
- ring.middleware.session.store)
- (:require (ring.util [codec :as codec]))
+ (:use ring.middleware.session.store)
+ (:require [ring.util.codec :as codec])
(:import java.security.SecureRandom
(javax.crypto Cipher Mac)
(javax.crypto.spec SecretKeySpec IvParameterSpec)))
-(defvar- seed-algorithm "SHA1PRNG"
- "Algorithm to seed random numbers.")
+(def ^:private seed-algorithm
+ "Algorithm to seed random numbers."
+ "SHA1PRNG")
-(defvar- hmac-algorithm "HmacSHA256"
- "Algorithm to generate a HMAC.")
+(def ^:private hmac-algorithm
+ "Algorithm to generate a HMAC."
+ "HmacSHA256")
-(defvar- crypt-type "AES"
- "Type of encryption to use.")
+(def ^:private crypt-type
+ "Type of encryption to use."
+ "AES")
-(defvar- crypt-algorithm "AES/CBC/PKCS5Padding"
- "Full algorithm to encrypt data with.")
+(def ^:private crypt-algorithm
+ "Full algorithm to encrypt data with."
+ "AES/CBC/PKCS5Padding")
(defn- secure-random-bytes
"Returns a random byte array of the specified size."

0 comments on commit 7eb669c

Please sign in to comment.