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

2019-01-23 06:02发布

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.

7条回答
三岁会撩人
2楼-- · 2019-01-23 06:30

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.

查看更多
3楼-- · 2019-01-23 06:34

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.

查看更多
4楼-- · 2019-01-23 06:36

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

查看更多
贪生不怕死
5楼-- · 2019-01-23 06:42

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

查看更多
smile是对你的礼貌
6楼-- · 2019-01-23 06:43

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.

查看更多
趁早两清
7楼-- · 2019-01-23 06:44

Maybe you can use libbeecrypt?

查看更多
登录 后发表回答