title: Android ndk MD5 hash function string conversion
body: <p>Hello I want to try include md5 hash c++ function to my Android NDK project.
  I have a problem with types. Eclipse shows me build invalid arguments error with the following message:</p>
  
  <blockquote>
    <p>Invalid arguments 'Candidates are: void update(const unsigned char *,
    unsigned int) void update(const char *,  unsigned int) '</p>
  </blockquote>
  
  <p>Method:</p>
  
  <pre><code>// nifty shortcut ctor, compute MD5 for string and finalize it right away
  MD5::MD5(const std::string &amp;text)
  {
      init();
      update(text.c_str(), text.length()); //there is problem
      finalize();
  }
  </code></pre>
  
  <p>I call this method:</p>
  
  <pre><code>// MD5 block update operation. Continues an MD5 message-digest
  // operation, processing another message block
  void MD5::update(const char input[], size_type length)
  {
      // compute number of bytes mod 64
      size_type index = count[0] / 8 % blocksize;
  
      // Update number of bits
      if ((count[0] += (length &lt;&lt; 3)) &lt; (length &lt;&lt; 3))
          count[1]++;
      count[1] += (length &gt;&gt; 29);
  
      // number of bytes we need to fill in buffer
      size_type firstpart = 64 - index;
  
      size_type i;
  
      // transform as many times as possible.
      if (length &gt;= firstpart)
      {
          // fill buffer first, transform
          memcpy(&amp;buffer[index], input, firstpart);
          transform(buffer);
  
          // transform chunks of blocksize (64 bytes)
          for (i = firstpart; i + blocksize &lt;= length; i += blocksize)
              transform(&amp;input[i]);
  
          index = 0;
      }
      else
          i = 0;
  
      // buffer remaining input
      memcpy(&amp;buffer[index], &amp;input[i], length - i);
  }
  
  //////////////////////////////
  
  // for convenience provide a verson with signed char
  void MD5::update(const char input[], size_type length)
  {
      update((const unsigned char*)input, length);
  }
  </code></pre>
  
  <p>What is wrong, project work normally in Visual Studio but in java NDK I have these problems...
  Thank you for help</p>