#deprecated #hash #stable #wrapper #platform #architecture #sip-hasher

unc-stable-hasher

unc-stable-hasher is a library that is essentially a wrapper around, now deprecated, std::hash::SipHasher

10 releases (4 breaking)

0.10.2 May 15, 2024
0.10.0 May 8, 2024
0.7.3 Apr 12, 2024
0.6.1 Mar 21, 2024
0.1.0 Mar 6, 2024

#274 in Date and time

Download history 56/week @ 2024-03-14 252/week @ 2024-03-21 4/week @ 2024-03-28 190/week @ 2024-04-04 169/week @ 2024-04-11 33/week @ 2024-04-18 99/week @ 2024-05-02 139/week @ 2024-05-09 44/week @ 2024-05-16 3/week @ 2024-05-23

815 downloads per month

GPL-2.0-or-later

12KB

unc-stable-hasher

unc-stable-hasher is a library that is essentially a wrapper around, now deprecated, std::hash::SipHasher. Its purpose is to provide a stable hash function, which doesn't change depending on rust_version, architecture, platform, time, etc.

In addition, note that SipHasher is deprecated since Rust 1.13.0. Eventually SipHasher will be removed from Rust. We need to ensure, nothing breaks during this transition period.

Structs

This crate provides only one struct. See StableHasher.

Example

fn test_stable_hasher() {
  let mut sh = StableHasher::new();

  sh.write(&[1, 2, 3, 4, 5]);
  let finish = sh.finish();
  assert_eq!(finish, 12661990674860217757)
}

No runtime deps