Generate md5 hash from string


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public byte[] generaPassword(String clave){
  2. byte[] password = {00};
  3. try {
  4. MessageDigest md5 = MessageDigest.getInstance("MD5");
  5. md5.update(clave.getBytes());
  6. password = md5.digest();
  7. return password;
  8. e.printStackTrace();
  9.  
  10. }
  11. return password;
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.