4 ms·
Great. But keep in mind that this is not a keyed hash function.
by jedisct1 10y ago
Great. But keep in mind that this is not a keyed hash function.
- dsp1234 10y agoThis is mentioned in the documentation: "Warning! This is not a cryptographic function, and it certainly should not be used as one. If you want a good cryptograhic hash function, you should use SHA-3 (Keccak) or BLAKE2."
- Dylan16807 10y agoThat's not the same thing. You don't usually key for crypto reasons, and a good cryptographic hash does not imply keying.
- pcwalton 10y agoYou can use it as a keyed hash function by adjusting the IV. See: https://docs.rs/seahash/2.0.0/src/seahash/.cargo/registry/src/github.com-1ecc6299db9ec823/seahash-2.0.0/src/reference.rs.html#94 https://docs.rs/seahash/2.0.0/src/seahash/.cargo/registry/sr...
- tveita 10y agoIt seems to already be implemented in https://docs.rs/seahash/2.1.1/src/seahash/.cargo/registry/src/github.com-1ecc6299db9ec823/seahash-2.1.1/src/buffer.rs.html#102 https://docs.rs/seahash/2.1.1/src/seahash/.cargo/registry/sr... But it only seeds one of the lanes, so you can still make collisions trivially in one of the other lanes. I guess it could still be useful for namespacing.