You are not logged in.
Pages: 1
function HashString(str: AnsiString): cardinal;
begin
Result:=Hash32(pointer(str), Length(str))
end;
str:
'120546506@115871'
'141084032@115871'
all result=3273449680.
hash32 bug...
Offline
Hash32 is at the lever of Adler32, which is used by deflate.
So IMHO this is not a bug.
Please note that Hash32 is NOT part of SynLZ by itself.
Just part of some higher level wrappers around it.
crc32c is better than hash32, about collisions.
We use crc32c everywhere in our code, but I would not change the algorithm of higher wrappers, since it is currently used at storage level.
Online
Pages: 1