You can use java.security.MessageDigest. For example:
(defn create-hash
[data-barray]
(.digest (java.security.MessageDigest/getInstance "SHA1") data-barray))
It takes and returns a byte array, but converting from/to a string is
fairly straight-forward:
(->> "Hello, World!"
.getBytes
create-hash
java.math.BigInteger.
(format "%x")
println)
On Saturday, March 1, 2014 11:26:29 AM UTC-5, action wrote:
> do like this:
> (ns clojurewerkz.support.hashing
> (:require [clojurewerkz.support.internal :as i])
> (:import [com.google.common.hash Hashing HashFunction HashCode]))
> but:
> FileNotFoundException Could not locate clojurewerkz/support__init.class or
> cloju
> rewerkz/support.clj on classpath: clojure.lang.RT.load (RT.java:443)
> how to set the dependencies, or other solution?
>
> Think you
>
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.