MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / oldtest_bit

Function oldtest_bit

oldbloom/bloom.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49inline static int oldtest_bit(uint8_t *bf, uint64_t bit)
50{
51 uint64_t byte = bit >> 3;
52 uint8_t c = bf[byte]; // expensive memory access
53 uint8_t mask = 1 << (bit % 8);
54 if (c & mask) {
55 return 1;
56 } else {
57 return 0;
58 }
59}
60
61static int oldbloom_check_add(struct oldbloom * bloom, const void * buffer, int len, int add)
62{

Callers 1

oldbloom_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected