aes_hash.rs |
|
13456 |
convert.rs |
|
4575 |
fallback_hash.rs |
|
13223 |
hash_map.rs |
|
9430 |
hash_quality_test.rs |
|
17906 |
hash_set.rs |
|
7655 |
lib.rs |
AHash is a hashing algorithm is intended to be a high performance, (hardware specific), keyed hash function.
This can be seen as a DOS resistant alternative to `FxHash`, or a fast equivalent to `SipHash`.
It provides a high speed hash algorithm, but where the result is not predictable without knowing a Key.
This allows it to be used in a `HashMap` without allowing for the possibility that an malicious user can
induce a collision.
# How aHash works
aHash uses the hardware AES instruction on x86 processors to provide a keyed hash function.
aHash is not a cryptographically secure hash.
# Example
```
use ahash::{AHasher, RandomState};
use std::collections::HashMap;
let mut map: HashMap<i32, i32, RandomState> = HashMap::default();
map.insert(12, 34);
```
For convinence wrappers called `AHashMap` and `AHashSet` are also provided.
These to the same thing with slightly less typing.
```ignore
use ahash::AHashMap;
let mut map: AHashMap<i32, i32> = AHashMap::with_capacity(4);
map.insert(12, 34);
map.insert(56, 78);
``` |
8508 |
operations.rs |
|
10964 |
random_state.rs |
|
11932 |
specialize.rs |
|
7811 |