/b64

Provides a data-reader and print-method support for base64-encoded byte-arrays

Primary LanguageClojure

b64

Provides a data-reader and print-method support for base64-encoded byte-arrays.

Usage

Add the library as a dependency to your project. In Leiningen:

  [net.djpowell/b64 "0.1.0"]

Ensure that the library has been loaded by requiring it from your ns form:

  (:require [net.djpowell.b64.core])

You can now embed byte arrays in code by using base-64 encoded literals:

  #djpowell/b64 "SGVsbG8gV29ybGQh"

Example:

  (String. #djpowell/b64 "SGVsbG8gV29ybGQh" "us-ascii")

=>

  "Hello world!"

License

Copyright (C) 2012 David Powell

Distributed under the Eclipse Public License, the same as Clojure.