grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(stdlib): Add ability to set seed on `Hash.hash`

Open spotandjake opened this issue 1 year ago • 2 comments

This pr adds the ability to set the seed of the hashing function.

I think it might be worth pinning the seed when this is used in Map and Set, which would make marshalling the values work between two separate runs.

spotandjake avatar Jan 02 '24 19:01 spotandjake

I updated this, due to the issue I ran into above I decided to go with the approach @phated had suggested at first.

I also rewrote the hashing function to avoid a mutable global. while this wasn't necessary I think it reduces the surface area for bugs to pop up.

spotandjake avatar Feb 01 '24 23:02 spotandjake

This should be done in a non-breaking way so I'm updating the title

phated avatar Mar 04 '24 00:03 phated

Closing in favour of #2170

spotandjake avatar Oct 04 '24 19:10 spotandjake