code: public static final String encodeString(String string,
                                              String encoding) throws RuntimeException {
          return StringConverter.byteToHex(digestString(string, encoding));
      }
docs: Retrieves a hexidecimal character sequence representing the MD5
  digest of the specified character sequence, using the specified
  encoding to first convert the character sequence into a byte sequence.
  If the specified encoding is null, then ISO-8859-1 is assumed
  
  @param string the string to encode.
  @param encoding the encoding used to convert the string into the
  byte sequence to submit for MD5 digest
  @return a hexidecimal character sequence representing the MD5
  digest of the specified string
  @throws RuntimeException if an MD5 digest
  algorithm is not available through the
  java.security.MessageDigest spi or the requested
  encoding is not available