mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00

MozReview-Commit-ID: BOgu41N351y --HG-- rename : third_party/rust/serde/.cargo-checksum.json => third_party/rust/serde-0.8.23/.cargo-checksum.json rename : third_party/rust/serde/Cargo.toml => third_party/rust/serde-0.8.23/Cargo.toml rename : third_party/rust/serde/src/bytes.rs => third_party/rust/serde-0.8.23/src/bytes.rs rename : third_party/rust/serde/src/de/impls.rs => third_party/rust/serde-0.8.23/src/de/impls.rs rename : third_party/rust/serde/src/de/mod.rs => third_party/rust/serde-0.8.23/src/de/mod.rs rename : third_party/rust/serde/src/de/value.rs => third_party/rust/serde-0.8.23/src/de/value.rs rename : third_party/rust/serde/src/error.rs => third_party/rust/serde-0.8.23/src/error.rs rename : third_party/rust/serde/src/lib.rs => third_party/rust/serde-0.8.23/src/lib.rs rename : third_party/rust/serde/src/macros.rs => third_party/rust/serde-0.8.23/src/macros.rs rename : third_party/rust/serde/src/ser/impls.rs => third_party/rust/serde-0.8.23/src/ser/impls.rs rename : third_party/rust/serde/src/ser/mod.rs => third_party/rust/serde-0.8.23/src/ser/mod.rs extra : rebase_source : d015147c7a6c01b34c5a1abf035d71f8ecfe0c12
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 experimental 128-bit mode.
Usage
In Cargo.toml
:
[dependencies]
siphasher = "~0.1"
64-bit mode:
extern crate siphasher;
use siphasher::sip::{SipHasher, SipHasher13, SipHasher24};
128-bit mode:
use siphasher::sip128::{Hasher128, Siphasher, SipHasher13, SipHasher24};