Posted By

raulintosh on 12/13/07


Tagged

java String hash md5


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

liqweed
PhaniKumar


Generate md5 hash from string


 / Published in: Java
 

  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  

You need to login to post a comment.