fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. java.io.PrintStream sysout = new java.io.PrintStream(System.out, true, "UTF-8");
  13.  
  14. String utf8_string = "¤3¤119829406¤2";
  15. sysout.println(utf8_string);
  16.  
  17. java.security.MessageDigest md5 = java.security.MessageDigest.getInstance("MD5");
  18. byte[] md5_byte_array = md5.digest(utf8_string.getBytes());
  19.  
  20. java.math.BigInteger md5_biginteger = new java.math.BigInteger(1, md5_byte_array);
  21. sysout.println(md5_biginteger.toString(16));
  22. }
  23. }
Success #stdin #stdout 0.13s 320704KB
stdin
Standard input is empty
stdout
¤3¤119829406¤2
fcee312dd5fbbfbfb81e0e92d2ab0af6