why can't I call .update on a MessageDigest instance

Posted by Arthur Ulfeldt on Stack Overflow See other posts from Stack Overflow or by Arthur Ulfeldt
Published on 2010-05-16T19:38:56Z Indexed on 2010/05/16 19:40 UTC
Read the original article Hit count: 229

Filed under:
|
|
|

when i run this from the repl:

(def md (MessageDigest/getInstance "SHA-1"))
(. md update (into-array [(byte 1)  (byte 2)  (byte 3)]))

I get:

No matching method found: update for class java.security.MessageDigest$Delegate

the Java 6 docs for MessageDigest show:

update(byte[] input) 
      Updates the digest using the specified array of bytes.

and the class of (class (into-array [(byte 1) (byte 2) (byte 3)])) is [Ljava.lang.Byte;

Am I missing something in the definition of update?
Not creating the class I think I am?
Not passing it the type I think I am?

© Stack Overflow or respective owner

Related posts about clojure

Related posts about java