Fast Cross-Platform C/C++ Hashing Library [closed]

2019-01-23 06:40发布

问题:

What's a high performance hashing library that's also cross platform for C/C++. For algorithms such as MD5, SHA1, CRC32 and Adler32.

I initially had the impression that Boost had these, but apparently not (yet).

The most promising one I have found so far is Crypto++, any other suggestions? http://www.cryptopp.com/ This seems to be quite comprehensive.

回答1:

For usual crypto hashes (MD?, SHA? etc.), openssl is the most portable and probably fastest. None of the hashes you mentioned are good for high performance data structures like hash tables. The recommended hash functions for these data structures these days are: FNV, Jenkins and MurmurHash.



回答2:

QT seem to implement MD4, MD5 and SHA1



回答3:

I'd definitely go with CryptoPP, it has a nice license to go with it as well.



回答4:

zlib has a built-in implementation of a crc32 variant, and is widely ported. =)



回答5:

Device cross platform? If it means to you what it means to me that means not linux or perhaps operating system independent. I would and did avoid such things as openssl. I went with libtomcrypt. Now as far as speed goes? Well fast, portable, C, chose any two.



回答6:

Maybe you can use libbeecrypt?



回答7:

Take a look at the plibsys C library: it support MD5, SHA1, SHA-2 (224, 256, 384, 512), SHA-3 (224, 256, 384, 512) and GOST 34.11-94 cryptography hash algorithms. The library is portable and light-weight itself.