Created
July 17, 2019 22:51
-
-
Save mangosmoothie/577406119cf24c51e8615bf8a975580c to your computer and use it in GitHub Desktop.
sha-1 hash clojure
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
(:import java.nio.charset.Charset | |
java.security.MessageDigest | |
javax.xml.bind.DatatypeConverter) | |
(defn get-sha [s] | |
(DatatypeConverter/printHexBinary | |
(.digest (MessageDigest/getInstance "SHA-1") (.getBytes s "UTF-8")))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment