MCPcopy Create free account
hub / github.com/docknetwork/crypto / get_bit

Function get_bit

oblivious_transfer/src/util.rs:182–186  ·  view source on GitHub ↗
(src: &[u8], i: usize)

Source from the content-addressed store, hash-verified

180#[cfg(test)]
181#[inline]
182fn get_bit(src: &[u8], i: usize) -> u8 {
183 let byte = src[divide_by_8(i)];
184 let bit_pos = modulo_8(i);
185 (byte & BITMASKS[bit_pos] != 0) as u8
186}
187
188#[cfg(test)]
189#[inline]

Callers 1

transpose_inplaceFunction · 0.85

Calls 2

divide_by_8Function · 0.85
modulo_8Function · 0.85

Tested by

no test coverage detected