code: public static String md5(String data, String enc) throws UnsupportedEncodingException
     {
        try
        {
           return digest("MD5", data.getBytes(enc));
        }
        catch (NoSuchAlgorithmException e)
        {
           throw new InternalError("MD5 digest not available???");
        }
     }
docs: Calculate an MD5 hash of the string given.
  
  @param data
  the data to encode
  @param enc
  the character encoding to use
  @return a hex encoded string of the md5 digested input