keymutex
keymutex copied to clipboard
Platform-dependentcy and randomization in HashHandles
I was looking for a keyed mutex and found your useful repo. Thank you for providing it.
I have two questions:
-
HashHandle func(key string) uintreturns a platform-dependent sized number, is this by design? Are the hash functions 32 or 64 bits? -
Is anyone else interested in a randomized HashHandle that is unpredictable to an attacker? In this case, the attacker (with access to source code) attempts to create requests that map to the same bucket by the hash function, therefor decreasing the performance of the server. I believe the build-in map in go is protected against this attack.