public static String encryptMD5asStringHex(String input) throws NoSuchAlgorithmException {
		byte[] output = encryptMD5(input.getBytes());
		StringBuilder sb = new StringBuilder("0x");
		 for (byte b : output) {
		    sb.append(hexDigit[(b >> 4) & 0x0f]);
		    sb.append(hexDigit[b & 0x0f]);
		 }
		 return sb.toString();
	}
public static String encryptMD5asStringHex ( String input ) throws NoSuchAlgorithmException { byte [ ] output = encryptMD5 ( input . getBytes ( ) ) ; StringBuilder sb = new StringBuilder ( "0x" ) ; for ( byte b : output ) { sb . append ( hexDigit [ ( b > > 4 ) & 0x0f ] ) ; sb . append ( hexDigit [ b & 0x0f ] ) ; } return sb . toString ( ) ; }
Convenience Function: Encrypt MD5 from String to String Hex representation

@param input
@return
@throws NoSuchAlgorithmException