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

Function is_multiple_of_8

oblivious_transfer/src/util.rs:58–60  ·  view source on GitHub ↗
(n: T)

Source from the content-addressed store, hash-verified

56
57#[inline]
58pub fn is_multiple_of_8<T: BitAnd<Output = T> + From<u8> + Eq>(n: T) -> bool {
59 modulo_8(n) == 0u8.into()
60}
61
62/// Transpose an 8x8 bit matrix given as a u64. The code is taken from the book Hacker's Delight's figure 7.6 after
63/// slight modification. In the book's code, the matrix is passed as an array of 8 bytes which converts it to a

Callers 9

newMethod · 0.85
boolvec_to_u8vecFunction · 0.85
newMethod · 0.85
derive_keysMethod · 0.85
newMethod · 0.85
newMethod · 0.85
newMethod · 0.85

Calls 1

modulo_8Function · 0.85

Tested by

no test coverage detected