Return a 16-byte hash for 48 bytes. Quick and dirty. Callers do best to use "random-looking" values for a and b.
| 340 | // Return a 16-byte hash for 48 bytes. Quick and dirty. |
| 341 | // Callers do best to use "random-looking" values for a and b. |
| 342 | static std::pair<std::uint64_t, std::uint64_t> WeakHashLen32WithSeeds(std::uint64_t w, std::uint64_t x, std::uint64_t y, std::uint64_t z, std::uint64_t a, std::uint64_t b) |
| 343 | { |
| 344 | a += w; |
| 345 | b = Rotate(b + a + z, 21); |
| 346 | std::uint64_t c = a; |
| 347 | a += x; |
| 348 | a += y; |
| 349 | b += Rotate(a, 44); |
| 350 | return std::make_pair(a + z, b + c); |
| 351 | } |
| 352 | |
| 353 | // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. |
| 354 | static std::pair<std::uint64_t, std::uint64_t> WeakHashLen32WithSeeds(const char* s, std::uint64_t a, std::uint64_t b) |
no test coverage detected