Question: I'm trying to find a good (and well documented) hashing library to use with my C++ program, I only need to generate two hashes from a string.

I've tried with `crypto++` and `mhash` and I didn't manage to make them work, also with <http://www.zedwood.com/article/121/cpp-md5-function>

I would be glad if this library is cross-platform.

Answer: 
Try this open source library <http://hashlib2plus.sourceforge.net/>
see my answer [here](https://stackoverflow.com/questions/4669306/using-cryptographic-streams-in-c/4671578#4671578). The original sample is taken from [here](http://www.cryptopp.com/fom-serve/cache/50.html), and operates on `std::string` rather than on `std::istream`. There are many good samples on cryptopp wiki, I'll try to look for some I used.

here's a sample from my code:

```
#include <cryptopp/md5.h>

byte digest[AES::BLOCKSIZE];
MD5().CalculateDigest(digest, (byte*)input.data(), input.size());

```

Here's the list of [cryptopp samples](http://www.cryptopp.com/wiki/Category:Sample) on their wiki. Look at HashFunctions and HashFilter.