title: How can I use openssl/md5 in C++ to hash a string?
body: <p>I need to hash with md5 algorithm a string in my program.
  There is the lib openssl but I'm a newbie about it.
  How is possible hash a string using that and where I can find a good doc that teach me how to use this lib, also with other function like aes?</p>
  <p>I've tried this code:</p>
  <pre><code>int main()
  {
      unsigned char result[MD5_DIGEST_LENGTH];
      const unsigned char* str;
      str = (unsigned char*)&quot;hello&quot;;
      unsigned int long_size = 100;
      MD5(str,long_size,result);
  }
  </code></pre>
  <p>But the compiler told me:
  undefined reference to <code>MD5</code>.</p>
  <p>Why is there and undefined reference to <code>MD5</code>?</p>