Skip to content

Instantly share code, notes, and snippets.

@pao
Created July 21, 2010 03:12
Show Gist options
  • Save pao/483987 to your computer and use it in GitHub Desktop.
Save pao/483987 to your computer and use it in GitHub Desktop.
package com.unsubsonic;
import java.security.MessageDigest;
import org.apache.commons.codec.binary.Hex;
public class Main {
public static void main(String[] a) {
String s = "emailyouwant@code.for";
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
System.out.println(new String(Hex.encodeHex(md5.digest(s.getBytes("UTF-8")))));
} catch (Exception x) {
throw new RuntimeException(x.getMessage(), x);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment