Project

General

Profile

Bug #4818

Updated by Anonymous about 5 years ago

murmurHash3 of an uint32_t value computes the hash of the in-memory 4-byte buffer. If this is part of a data structure that is sent to another computer with a difference between big endian and little endian, then they won't compute the same hash. 
 https://github.com/named-data/PSync/blob/0cf4b600e91455ee07c38eb22876aa6b653bc14b/PSync/detail/util.cpp#L103 

 Maybe this should use endian::native_to_little, similar to endian::native_to_big, like in the TLV encoder (Intel chips use little endian): encoder: 
 https://github.com/named-data/ndn-cxx/blob/master/ndn-cxx/encoding/encoder.cpp#L151 

Back