Aaron Fischer
08f504f303
Fixes #9 Relates #8 * Support mojoreads as a new data source * Change image file names to hashsums to be more generic * Clean up the source code by separate relates stuff in own files * Fix the Chaos Monkeys book
12 lines
326 B
Clojure
12 lines
326 B
Clojure
(ns buchdesmonats.hash
|
|
(:import [java.security MessageDigest]
|
|
[java.math BigInteger]))
|
|
|
|
;;; Stolen from: https://gist.github.com/jizhang/4325757#gistcomment-2633984
|
|
(defn md5 [^String s]
|
|
(->> s
|
|
.getBytes
|
|
(.digest (MessageDigest/getInstance "MD5"))
|
|
(BigInteger. 1)
|
|
(format "%032x")))
|