Java - String2MD5
Join the DZone community and get the full member experience.
Join For Free
public static byte[] getKeyedDigest(byte[] buffer, byte[] key) {
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(buffer);
return md5.digest(key);
} catch (NoSuchAlgorithmException nsae) {}
return null;
}
Java (programming language)
Opinions expressed by DZone contributors are their own.
Comments