#deprecated #stable #wrapper #now #hash #near #sip-hasher

near-stable-hasher

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

11 unstable releases (5 breaking)

0.21.2 Mar 14, 2024
0.21.1 Mar 11, 2024
0.20.1 Jan 23, 2024
0.19.0 Dec 21, 2023
0.1.0 Oct 4, 2021

#539 in Magic Beans

Download history 10/week @ 2023-12-20 36/week @ 2024-01-03 36/week @ 2024-01-10 5/week @ 2024-01-17 1/week @ 2024-01-24 98/week @ 2024-02-14 7/week @ 2024-02-21 11/week @ 2024-02-28 252/week @ 2024-03-06 153/week @ 2024-03-13 11/week @ 2024-03-20 25/week @ 2024-03-27 46/week @ 2024-04-03

272 downloads per month
Used in near-network

MIT/Apache

6KB

near-stable-hasher

near-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