Advertisement
Guest User

Untitled

a guest
Jan 1st, 2013
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. package uk.roundtable.gawain;
  2.  
  3. import java.io.PrintStream;
  4. import java.math.BigInteger;
  5. import java.security.MessageDigest;
  6. import java.security.NoSuchAlgorithmException;
  7. import java.util.Scanner;
  8.  
  9. public class Gawain
  10. {
  11. public static void main(String[] args)
  12. {
  13. Scanner s = new Scanner(System.in);
  14. String s1 = s.nextLine() + "Ρ…ΡƒΠΉ";
  15. try {
  16. BigInteger bigInt = new BigInteger(1, MessageDigest.getInstance("MD5").digest(s1.getBytes()));
  17. String s2 = bigInt.toString(16);
  18. System.out.print(s2);
  19. } catch (NoSuchAlgorithmException e) {
  20. System.out.println("fail");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement