 
 (defmethod session-cookie :cookie
   [new? session]
-  (let [cookie-data
-        (if (contains? *session-repo* :encryption) 
-          (session-crypt encrypt (marshal session))
-          (marshal session))]
+  (let [cookie-data (session-crypt encrypt (marshal session))]
     (if (> (count cookie-data) 4000)
       (throwf "Session data exceeds 4K")
       (str cookie-data "--" (session-hmac cookie-data)))))

    (hmac hash-key hash-algorithm cookie-data)))

(defn session-crypt
  [f session]
  (let [encryption-opts (merge *default-encryption*
                               (:encryption *session-repo*))


;; Cookie sessions
(def *default-encryption*
  {:algorithm      "AES/CBC/PKCS5Padding"
   :secret-key     (gen-key "AES" 128)
   :cbc-params     (gen-iv-param 16)
   :hash-key       (secure-random-bytes 32)
   :hash-algorithm "HmacSHA256"})

(defn session-hmac
  "Calculate a HMAC for a marshalled session.  Uses the :hash-key and
