#crypto #hash #siphash

siphasher

SipHash-2-4, SipHash-1-3 and 128-bit variants in pure Rust

16 releases

0.3.7 Sep 2, 2021
0.3.6 Jul 26, 2021
0.3.5 Mar 19, 2021
0.3.3 Apr 24, 2020
0.1.3 Nov 29, 2016

#12 in Cryptography

Download history 110791/week @ 2021-07-04 110978/week @ 2021-07-11 113662/week @ 2021-07-18 123762/week @ 2021-07-25 129778/week @ 2021-08-01 131837/week @ 2021-08-08 124262/week @ 2021-08-15 133087/week @ 2021-08-22 141808/week @ 2021-08-29 133595/week @ 2021-09-05 155281/week @ 2021-09-12 164938/week @ 2021-09-19 161861/week @ 2021-09-26 171055/week @ 2021-10-03 180804/week @ 2021-10-10 196686/week @ 2021-10-17

504,680 downloads per month
Used in 2,042 crates (50 directly)

MIT/Apache

53KB
1.5K SLoC

SipHash implementation for Rust

This crates implements SipHash-2-4 and SipHash-1-3 in Rust.

It is based on the original implementation from rust-core and exposes the same API.

It also implements SipHash variants returning 128-bit tags.

The sip module implements the standard 64-bit mode, whereas the sip128 module implements the 128-bit mode.

Usage

In Cargo.toml:

[dependencies]
siphasher = "0.3"

If you want serde support, include the feature like this:

[dependencies]
siphasher = { version = "0.3", features = ["serde"] }

64-bit mode:

extern crate siphasher;

use siphasher::sip::{SipHasher, SipHasher13, SipHasher24};

128-bit mode:

use siphasher::sip128::{Hasher128, Siphasher, SipHasher13, SipHasher24};

API documentation

Dependencies

~205KB

0a