6 Jan
2018
6 Jan
'18
6:06 p.m.
Vinnie Falco wrote:
In the absence of an algorithm which allows for a seed, a less efficient but equally effective method is to prepend a unique value, specific to the instance of the hash function, to theinput data. This can be turned into a generic wrapper (I believe Peter will eventually add such a thing if he has not done so already).
I decided to require algorithms to support seeding as part of the concept requirements. If the best an algorithm can do with that seed is to prepend it to the value (as-if by default constructing and calling update(seed, n)), it can do so, but usually, the algorithm can do better than that.