MD5 / SHA1 Hashes erzeugen mit JAVA
public static String getMD5Hash(String in) {
StringBuffer result = new StringBuffer(32);
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(in.getBytes());
Formatter f = new Formatter(result);
for (byte b : md5.digest()) {
f.format("%02x", b);
}
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
}
return result.toString();
}
Post Tags: JAVA
Browse Timeline
Comments ( Be the First )
John added these pithy words on May 31 08 at 3:49 amGreat site and useful content! Could you leave some opinion about my sites?
My pages
[url=http://ownsite.com/b/]My pages[/url]
http://ownsite.com/p/ My pages
