I was wondering if there is any way to get the PHP SHA1 with raw returning in Java. Just like this in PHP: sha1("abc123", true) Anyone got an idea? It would be appreciated very much.
Asked
Active
Viewed 318 times
1 Answers
0
You could write something like
java.security.MessageDigest.getInstance("SHA-1").digest("abc123".getBytes())
(maybe you want to pass the Charset to getBytes()) or use org.apache.commons.codec.digest.DigestUtils#sha1(String)

JeffreyH
- 31
- 5
-
Thanks very much! My app now works! – thomasb Jan 20 '16 at 06:47