diff --git a/src/taoensso/nippy/tools.clj b/src/taoensso/nippy/tools.clj index 6656805..58d1456 100644 --- a/src/taoensso/nippy/tools.clj +++ b/src/taoensso/nippy/tools.clj @@ -37,8 +37,8 @@ "Like `nippy/thaw` but takes options from *thaw-opts* binding, and wraps encrypted bytes for easy identification when no password has been provided for decryption." - [ba & {:keys [default-opts]}] - (let [result (nippy/thaw ba (merge (or *thaw-opts* default-opts) + [ba & [{:keys [default-opts]}]] + (let [result (nippy/thaw ba (merge default-opts *thaw-opts* {:taoensso.nippy/tools-thaw? true}))] (if (= result :taoensso.nippy/need-password) (EncryptedFrozen. ba) @@ -46,4 +46,4 @@ (comment (thaw (nippy/freeze "c" {:password [:cached "p"]})) (with-thaw-opts {:password [:cached "p"]} - (thaw (nippy/freeze "c" {:password [:cached "p"]})))) \ No newline at end of file + (thaw (nippy/freeze "c" {:password [:cached "p"]})))) diff --git a/src/taoensso/nippy/utils.clj b/src/taoensso/nippy/utils.clj index de65983..23c4924 100644 --- a/src/taoensso/nippy/utils.clj +++ b/src/taoensso/nippy/utils.clj @@ -92,4 +92,4 @@ (comment (String. (ba-concat (.getBytes "foo") (.getBytes "bar"))) (let [[x y] (ba-split (.getBytes "foobar") 5)] - [(String. x) (String. y)])) \ No newline at end of file + [(String. x) (String. y)]))