Here you can find the source of hash(String password)
private static byte[] hash(String password)
//package com.java2s; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { private static byte[] hash(String password) { MessageDigest digest = null; try {/*w w w . java2 s.c o m*/ // MD5-128 digest = java.security.MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } digest.update(password.getBytes()); byte messageDigest[] = digest.digest(); return messageDigest; } }