| 113 | } |
| 114 | |
| 115 | bool BloomFilter::possiblyContains(const uint8_t *item, int length) const { |
| 116 | auto hashValues = hash(item, length); |
| 117 | |
| 118 | for (uint8_t n = 0; n < impData.m_numHashes; n++) { |
| 119 | auto bitPos = nthHash(n, hashValues[0], hashValues[1], impData.length); |
| 120 | if (!store.isSet(bitPos)) { |
| 121 | return false; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | return true; |
| 126 | } |
no test coverage detected