Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
clojure sha1 hash
(defn get-hash [type data]
(.digest ( type) (.getBytes data) ))
(defn sha1-hash [data]
(get-hash "sha1" data))
(defn get-hash-str [data-bytes]
(apply str
(+ (bit-and % 0xff) 0x100) 16) 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment