I understand how it works but if I want to print out the MD5 as String how would I do that?
public static void getMD5(String fileName) throws Exception{
String input = "168"; MessageDigest md = MessageDigest.getInstance("MD5"); byte[] md5sum = md.digest(input.getBytes()); String output = String.format("%032X", new BigInteger(1, md5sum));
or
DatatypeConverter.printHexBinary( MessageDigest.getInstance("MD5").digest("a".getBytes("UTF-8")))