Possible Duplicate:
Generate MD5 hash in Java
Hi,
I want to compute the MD5 hash of a string in my scala code. Is there any scala or java library i can use to do this quickly, apart from the regular java.security.MessageDigest way ?
Please Help
Thanks
You may be reinventing a very tiny wheel here, but just write a function to do what you want: take a string, use MessageDigest, and return whatever (hex string, byte array) you need.
P.S. I don’t write Scala, but this works and it’s left as an exercise to the reader to turn it into anything other than an Array[Byte]