clojure.data.codec

Add simple utility functions for base64 conversions?

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Can we add (something like) the following simple utility functions for base64 encoding/decoding ?

(defn bytes->b64str [bytes]
(String. (encode bytes)))

(defn str->b64str [s]
(bytes->b64str (.getBytes s)))

(defn b64str->bytes [b64-str]
(decode (.getBytes b64-str)))

(defn b64str->str [b64-str]
(String. (b64str->bytes b64-str)))

Activity

No changes have yet been made on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: