Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison to standard libary's std::hash::Hash derive #13

Open
daboross opened this issue Sep 13, 2024 · 0 comments
Open

Comparison to standard libary's std::hash::Hash derive #13

daboross opened this issue Sep 13, 2024 · 0 comments

Comments

@daboross
Copy link

Hi!

I came across this library from https://www.dfns.co/article/unambiguous-hashing.

Loved the writeup, but I felt like it was missing a comparison to existing alternatives - mainly, std::hash::Hash, and #[derive(Hash)]. I thought I'd suggest adding it!

Mainly, I was at first worried that maybe std::hash::Hash is vulnerable to moving around bytes like the naive implementation, found that it wasn't, but that (surprisingly to me) it is platform-dependent - impl Hash for [u8] encodes length as a usize, and thus so does Vec and String. I think that's a great selling point for udigest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant