help - why is this no work?!
Shao Sean
shaosean at wehostmacs.com
Thu May 14 03:06:24 EDT 2009
on mouseUp
constant kData = "M"
constant k32 = 4294967296
constant kPrime = 16777619
local tHash = 2166136261
repeat for each byte tByte in kData
put (tHash * kPrime) MOD k32 into tHash
put tHash bitXor byteToNum(tByte) into tHash
end repeat
put format("%08s", baseConvert(tHash, 10, 16))
end mouseUp
gives me 0x050C5D6D
yet _EVERY_ program I use to compute the FNV1-32 hash gives me
0x050C5D52 for the answer
The math is simple yet it is not giving the correct answer and I have
wasted the last two and a half days on this.. *sigh*
http://isthe.com/chongo/tech/comp/fnv/
More information about the use-livecode
mailing list