pub struct SipHasher(_);
👎Deprecated since 1.13.0: use
std::collections::hash_map::DefaultHasher
insteadExpand description
SipHash 2-4 的实现。
请参见:https://131002.net/siphash/
SipHash 是通用的哈希函数:它以良好的速度运行 (与 Spooky 和 City 竞争),并允许强大的 keyed 哈希。
这使您可以从强 RNG (例如 rand::os::OsRng
) 中键入哈希表。
尽管 SipHash 算法通常被认为是强大的,但它并非旨在用于加密目的。 这样,此实现的所有加密用途都是 strongly discouraged。
Implementations§
Trait Implementations§
source§impl Hasher for SipHasher
impl Hasher for SipHasher
source§fn write_str(&mut self, s: &str)
fn write_str(&mut self, s: &str)
🔬This is a nightly-only experimental API. (
hasher_prefixfree_extras
#96762)将单个
str
写入此哈希器。 Read more1.26.0 · source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
将单个
u128
写入此哈希器。1.3.0 · source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
将单个
usize
写入此哈希器。1.26.0 · source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
将单个
i128
写入此哈希器。1.3.0 · source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
将单个
isize
写入此哈希器。Auto Trait Implementations§
impl RefUnwindSafe for SipHasher
impl Send for SipHasher
impl Sync for SipHasher
impl Unpin for SipHasher
impl UnwindSafe for SipHasher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more