List of utility methods to do MD5 Hash
String | md5hash(String key) mdhash return hashWithAlgorithm(HASH_ALGORITHM_MD5, key);
|
String | md5hash(String pass) mdhash try { MessageDigest md = MessageDigest.getInstance("MD5"); BigInteger bi = new BigInteger(1, md.digest(pass.getBytes())); String hash = bi.toString(16); if (hash.length() < 32) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < 32 - hash.length(); i++) { buf.append('0'); ... |
String | md5Hash(String source) md Hash MessageDigest digest = MessageDigest.getInstance("MD5"); digest.update(source.getBytes(), 0, source.length()); return String.format("%032X", new BigInteger(1, digest.digest())); |
String | md5Hash(String text) Compute the MD-5 hash of a string, and return it has a string of hexadecimal numbers. return bytesToHex(computeHash(text, HASH_MD5));
|
byte[] | md5HashBytesToBytes(byte[] buf) md Hash Bytes To Bytes try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(buf); return md.digest(); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); |
int | md5HashInt(String text) Compute the MD-5 hash of a string, and return a truncated int-value of the hash. return truncateHashToInt(computeHash(text, HASH_MD5));
|