Skip to content
/ base64 Public

Cross-platform base64 {en,de}coding

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md
Notifications You must be signed in to change notification settings

NuID/base64

Repository files navigation

nuid.base64

Cross-platform base64 {en,de}coding.

Requirements

jvm, node + npm, clj, shadow-cljs

Clojure and ClojureScript

tools.deps:

{nuid/base64 {:git/url "https://github.com/nuid/base64" :sha "..."}}

usage:

$ clj # or shadow-cljs node-repl
=> (require '[nuid.base64 :as base64])
=> (def b64 (base64/encode "🐴"))    ;; defaults to reading input as utf8
=> b64                               ;; => "8J+QtA=="
=> (base64/decode b64)               ;; => buffer-like: [-16 -97 -112 -76] (endianness may vary)
=> (base64/str b64)                  ;; => "🐴"
=> (base64/str b64 :charset/utf16le) ;; => "鿰뒐"

Licensing

Apache v2.0 or MIT