Can I create two differently behaving Hasher instances using only std without deprecation? I see there is DefaultHasher, but the only way to create one seems to be via DefaultHasher::new(), and these seem to behave the same. There actually different Hasher implementations, but all I can find are deprecated.
I want to create keys for collections using hashing. If I use u64, collision probability is too high, but for (u64, u64) it's acceptable, as long as I can get two independent values.
Thanks, suppose I could implement my own. Is there a reason why the existing implementations are deprecated? Actually, even DefaultHasher is using the deprecated SipHasher13 under the hood.
Here's a paragraph from the book that explains it, but basically Rust's standard library does not want to provide hashing algorithms. They want to provide ONE algorithm that is safe enough to always be good enough. That's what DefaultHasher is. It's not guaranteed to be the same algorithm that it was before, or as fast as it was before, it's just what the maintainers think is safe enough to be shipped out as the general-purpose Hasher.