#crypto #hash #siphash

siphasher

SipHash functions from rust-core < 1.13

9 releases

0.3.0 Dec 20, 2018
0.2.3 Jul 30, 2018
0.2.2 Mar 23, 2017
0.2.1 Jan 24, 2017
0.1.2 Oct 26, 2016

#27 in Cryptography

Download history 23112/week @ 2018-12-20 24746/week @ 2018-12-27 31816/week @ 2019-01-03 32995/week @ 2019-01-10 33179/week @ 2019-01-17 32294/week @ 2019-01-24 35132/week @ 2019-01-31 39334/week @ 2019-02-07 38503/week @ 2019-02-14 43293/week @ 2019-02-21 45259/week @ 2019-02-28 45585/week @ 2019-03-07 46513/week @ 2019-03-14 42185/week @ 2019-03-21 42937/week @ 2019-03-28

125,880 downloads per month
Used in 1,572 crates (30 directly)

MIT/Apache

43KB
1K SLoC

SipHash implementation for Rust

SipHash was recently removed from rust-core.

This crate brings SipHasher, SipHasher13 and SipHash24 back. It is based on the original implementation from rust-core and exposes the same API.

In addition, it can return 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"

64-bit mode:

extern crate siphasher;

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

128-bit mode:

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

API documentation

No runtime deps