Use full digest length instead of just one byte.

When our universal hash function fell back to MD5 for inputs larger than
supported by H3, the computation only returned the first byte of the MD5 result
instead of as many bytes as needed to cover sizeof(Hasher::digest).
This commit is contained in:
Matthias Vallentin 2014-06-05 15:42:31 +02:00
parent 8ec8dfa705
commit 1d50874256

View file

@ -108,7 +108,7 @@ Hasher::digest UHF::hash(const void* x, size_t n) const
MD5(d, 16, d);
return d[0];
return *reinterpret_cast<const Hasher::digest*>(d);
}
DefaultHasher::DefaultHasher(size_t k, size_t seed)