Return to Snippet

Revision: 4449
at December 13, 2007 08:07 by raulintosh


Initial Code
public byte[] generaPassword(String clave){
		byte[] password = {00};
		try {
			MessageDigest md5 = MessageDigest.getInstance("MD5");
			md5.update(clave.getBytes());
			password = md5.digest();
			return password;
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
			
		}
		return password;
	}

Initial URL

                                

Initial Description

                                

Initial Title
Generate md5 hash from string

Initial Tags
java

Initial Language
Java