Announcing clj-base64
I’ve justed released a small clojure library called clj-base64
for encoding and decoding data using the Base64 coding scheme. The code’s at github (and gitorious) and a pom and jar have been pushed to clojars.
Lein it up:
(defproject..
:dependencies [..
[clj-base64 "0.0.0-SNAPSHOT"]]..
And use it:
(use 'remvee.base64)
(encode-str "I 8> clojure!") ; => "SSA4PiBjbG9qdXJlIQ=="
(decode-str "SSA4PiBjbG9qdXJlIQ==") ; => "I 8> clojure!"
Enjoy!
You know there’s a base64 encoder in clojure.contrib, right? clojure/clojure/contrib/base64.clj
Unfortunately it doesn’t do any decoding.
I know.. but it didn’t teach me any clojure or got me to play with clojars. ;)