MD5 and SHA1 C ++ hash library

I am trying to find a good (and well-documented) hash library to use with my C ++ program, I only need to create two hashes from the string.

I tried with crypto++ and mhash and I was not able to get them to work, as well as http://www.zedwood.com/article/121/cpp-md5-function

I would be happy if this library was cross-platform.

+6
c ++ hash md5 sha1
source share
3 answers

Try this open source library http://hashlib2plus.sourceforge.net/

+4
source share

Search, before asking, already has a question: What is the best encryption library in C / C ++?

Solutions like OpenSSL and Crypto ++ are cross-platform, if you weren’t able to get them to work, you should have been more specific: I am using OS xyz version xyz, compiler xyz version xyz, IDE xyz version xyz, trying get the working xyz library of xyz version from http: // xyz , and it doesn’t work because xyz errors.

+3
source share

see my answer here . The original sample is taken from here and works only on std::string , and not on std::istream . There are many good examples on Wiki Cryptopp, I will try to find some of them.

here is a sample from my code:

 #include <cryptopp/md5.h> byte digest[AES::BLOCKSIZE]; MD5().CalculateDigest(digest, (byte*)input.data(), input.size()); 

Here is a list of crypto samples on their wiki. Take a look at HashFunctions and HashFilter.

+2
source share

All Articles