This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn get-hash [type data] | |
(.digest (java.security.MessageDigest/getInstance type) (.getBytes data) )) | |
(defn sha1-hash [data] | |
(get-hash "sha1" data)) | |
(defn get-hash-str [data-bytes] | |
(apply str | |
(map | |
#(.substring |