Skip to content

Instantly share code, notes, and snippets.

@asinbow
Created June 26, 2012 16:00
Show Gist options
  • Save asinbow/2996682 to your computer and use it in GitHub Desktop.
Save asinbow/2996682 to your computer and use it in GitHub Desktop.
scala/java get md5 checksum
"123".getBytes
val md = java.security.MessageDigest.getInstance("MD5")
md.update("d123".getBytes)
md.digest()
val md5 = org.apache.commons.codec.binary.Hex.encodeHex(res)
new String(md5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment