MessageDigest - Autogenerated Crowd Documention

"MessageDigest is your friend. Call getInstance("MD5") to get an MD5 message digest you can use."

Top Threads

30 In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros?

23 Performance of ThreadLocal variable

18 How do I use 3des encryption/decryption in Java?

16 Using SHA1 and RSA with vs. MessageDigest and Cipher

12 How do you determine the ideal buffer size when using FileInputStream?

Popular Snippet

public static String MD5hash(String text) throws NoSuchAlgorithmException {
    byte[] hash = MessageDigest.getInstance("MD5").digest(text.getBytes());
    return String.format("%032x",new BigInteger(1, hash));

Other Resources