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

near-stable-hasher

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

15 releases (9 breaking)

0.27.0 Nov 4, 2024
0.25.0 Aug 21, 2024
0.22.0 May 17, 2024
0.21.2 Mar 14, 2024
0.1.0 Oct 4, 2021

#623 in Magic Beans

Download history 140/week @ 2024-08-21 91/week @ 2024-09-04 53/week @ 2024-09-11 24/week @ 2024-09-18 15/week @ 2024-09-25 2/week @ 2024-10-02 1/week @ 2024-10-09 98/week @ 2024-10-30 40/week @ 2024-11-06

138 downloads per month
Used in near-network

MIT/Apache

7KB

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