import java.security.*;
MessageDigest md = MessageDigest.getInstance("MD5");
fails with NoSuchAlgorithm
exception.
MessageDigest docs](http://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html) say:
Every implementation of the Java platform is required to support the following standard MessageDigest algorithms: MD5 SHA-1 SHA-256 These algorithms are described in the MessageDigest section of the Java Cryptography Architecture Standard Algorithm Name Documentation. Consult the release documentation for your implementation to see if any other algorithms are supported.
So how come it throws the exception?
luckily
import org.apache.commons.codec.digest.DigestUtils;
System.out.println( "md5 = "+DigestUtils.md5Hex( string ) );
works perfectly, plus it is elegant, but still looks like a pretty basic failure. What am I missing?