Author jdemeyer
Recipients eric.smith, jdemeyer, mark.dickinson, rhettinger, sir-sigurd, tim.peters
Date 2018-09-25.08:51:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537865511.33.0.545547206417.issue34751@psf.upfronthosting.co.za>
In-reply-to
Content
> And one more:

        x = (x * mult) ^ t;

also appears to work equally well.

The order of operations does not really matter: you can write the loop as

x *= mult   # Appears only in FNV-1
x ^= t[0]
x *= mult
x ^= t[1]
x *= mult
x ^= t[2]
x *= mult
x ^= t[3]
x *= mult  # Appears only in FNV-1a

The initial multiplication is equivalent to changing the initial value and the final multiplication is just a permutation of the outputs. None of those should really affect the quality of the hash.
History
Date User Action Args
2018-09-25 08:51:51jdemeyersetrecipients: + jdemeyer, tim.peters, rhettinger, mark.dickinson, eric.smith, sir-sigurd
2018-09-25 08:51:51jdemeyersetmessageid: <1537865511.33.0.545547206417.issue34751@psf.upfronthosting.co.za>
2018-09-25 08:51:51jdemeyerlinkissue34751 messages
2018-09-25 08:51:51jdemeyercreate