]> git.proxmox.com Git - rustc.git/blob - src/vendor/siphasher/README.md
New upstream version 1.22.1+dfsg1
[rustc.git] / src / vendor / siphasher / README.md
1 SipHash implementation for Rust
2 ===============================
3
4 SipHash was recently removed from rust-core.
5
6 This crate brings `SipHasher`, `SipHasher13` and `SipHash24` back.
7 It is based on the original implementation from rust-core and exposes the
8 same API.
9
10 In addition, it can return 128-bit tags.
11
12 The `sip` module implements the standard 64-bit mode, whereas the `sip128`
13 module implements the 128-bit mode.
14
15 Usage
16 -----
17 In `Cargo.toml`:
18
19 ```toml
20 [dependencies]
21 siphasher = "~0.1"
22 ```
23
24 64-bit mode:
25 ```rust
26 extern crate siphasher;
27
28 use siphasher::sip::{SipHasher, SipHasher13, SipHasher24};
29 ```
30
31 128-bit mode:
32 ```rust
33 use siphasher::sip128::{Hasher128, Siphasher, SipHasher13, SipHasher24};
34 ```
35
36 [API documentation](https://docs.rs/siphasher/)
37 -----------------------------------------------