#crypto #hash #siphash

siphasher

SipHash functions from rust-core < 1.13

8 releases

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

#1 in Cryptography

Download history 21580/week @ 2018-07-20 21058/week @ 2018-07-27 25709/week @ 2018-08-03 25091/week @ 2018-08-10 22821/week @ 2018-08-17 23035/week @ 2018-08-24 24207/week @ 2018-08-31 23525/week @ 2018-09-07 23895/week @ 2018-09-14 25409/week @ 2018-09-21 24432/week @ 2018-09-28 27554/week @ 2018-10-05 25236/week @ 2018-10-12

91,775 downloads per month
Used in 1,064 crates (23 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.2"

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