Python bindings to seahash
- A blazingly fast, portable hash function with proven statistical guarantees.
pip install seahash
Wheels should be available for most platforms. If you need a wheel which isn't provided, raise an issue.
Compiling from source will require a Rust toolchain.
Hashing can be done in 2 ways:
import seahash
# Plain hash
seahash.hash(b"123")
# Hash with custom seeds
seahash.hash_seeded(b"123", 4, 5, 6, 7)
Both methods return an int
.
For convenience, a hashlib
-compatible class is provided:
import seahash
s = seahash.SeaHash()
s.update(b"123")
s.digest()
s.hexdigest()
The underlying int
digest can be obtained with intdigest
.