-
-
Save tomjack/44ebe95923fa6a4bc5c7 to your computer and use it in GitHub Desktop.
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
(let [md5 (MessageDigest/getInstance "MD5")] | |
(defn md5-seed [s] | |
(let [digest (.digest md5 (.getBytes s))] | |
(with-open [bytes-in (ByteArrayInputStream. digest) | |
data-in (DataInputStream. bytes-in)] | |
(.readLong data-in))))) | |
(->> (.readLong data-in) | |
(with-open [bytes-in (ByteArrayInputStream. digest) | |
data-in (DataInputStream. bytes-in)]) | |
(let [digest (.digest md5 (.getBytes s))]) | |
(defn md5-seed [s]) | |
(let [md5 (MessageDigest/getInstance "MD5")])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment