Is there a hash function with following properties?
- is associative
- is not commutative
- easily implementable on 32 bit integers:
int32 hash(int32, int32)
If I am correct, such function allows achieving following goals
- calculate hash of concatenated string from hashes of substrings
- calculate hash concurrently
- calculate hash of list implemented on binary tree - including order, but excluding how tree is balanced
The best I found so far is multiplication of 4x4 matrix of bits, but thats awkward to implement and reduces space to 16bits.
I am grateful for any help.