Clojure base64 encoding

后端 未结 6 1882
深忆病人
深忆病人 2020-12-09 17:31

I want something as simple as \"string\" -> base64. With the older base64.encode-str it was easy (and sounded \"more clojure\", but the newer clojure.data.codec.base64

6条回答
  •  眼角桃花
    2020-12-09 18:12

    You can use encode function and pass array of bytes:

    (encode (.getBytes "Hello world!"))
    

提交回复
热议问题