Created
July 21, 2010 03:12
-
-
Save pao/483987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "[email protected]"; | |
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