This library implements encoding and decoding Branca tokens in Clojure.
(require '[clj-branca.core :as branca])
(def secret-key "supersecretkeyyoushouldnotcommit")
(def message "Hello, world!")
(branca/encode secret-key message)
;; "XZ69WpRTqZgEOqCJqaOK4iOKGLkg505VSASQ8MMGWs3mn1p6U81FvB5rSLpKlIjkZTUIBC6KiHIboz"
(String. (branca/decode secret-key "XZ69WpRTqZgEOqCJqaOK4iOKGLkg505VSASQ8MMGWs3mn1p6U81FvB5rSLpKlIjkZTUIBC6KiHIboz"))
;; "Hello, world!"
Status: Pre-release
What needs to happen before a release?
Copyright Miikka Koskinen
Can you improve this documentation?Edit on sourcehut
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close