Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 925
The Unknown Avatar asked Apr 28 '09 21:04

The Unknown


People also ask

What is CPP hash?

A Hash Table in C/C++ (Associative array) is a data structure that maps keys to values. This uses a hash function to compute indexes for a key. Based on the Hash Table index, we can store the value at the appropriate location.

What is hashing in data structure?

Hashing in the data structure is a technique of mapping a large chunk of data into small tables using a hashing function. It is also known as the message digest function. It is a technique that uniquely identifies a specific item from a collection of similar items.

How is hash table implemented?

Implementation of a hash table. The basic idea behind hashing is to distribute key/value pairs across an array of placeholders or "buckets" in the hash table. Using this method, hash is independent of the size of the hash table.


1 Answers

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.

like image 143
obecalp Avatar answered Sep 22 '22 00:09

obecalp