I try to get MD5 string using Java, but the function below return string "MD5 Message Digest from SUN, <in progress>"
:
public String hash(String value) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(value.getBytes("UTF-8"));
return md.toString();
} catch (NoSuchAlgorithmException e) {
return null;
} catch (UnsupportedEncodingException e) {
return null;
}
}
I'm using OpenJDK on Xubuntu. Why I get this message? Is there a way to get MD5 hash using this setup?
I found the solution that work,