Skip to content

Instantly share code, notes, and snippets.

@mehmetbebek
Created February 17, 2014 14:10
Show Gist options
  • Save mehmetbebek/9051235 to your computer and use it in GitHub Desktop.
Save mehmetbebek/9051235 to your computer and use it in GitHub Desktop.
Encryption With MD5 at Java
try {
Scanner input = new Scanner(System.in);
System.out.println("Input Value");
String willEncryptText = input.next();
byte[] bytesOfMessageText = willEncryptText.getBytes("UTF-8");
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] thedigest = md.digest(bytesOfMessageText);
System.out.println(thedigest);
} catch (Exception e) {
//
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment