MCPcopy Create free account
hub / github.com/LUX-Core/lux / SetBit

Method SetBit

src/cryptopp/gf2n.cpp:69–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void PolynomialMod2::SetBit(size_t n, int value)
70{
71 if (value)
72 {
73 reg.CleanGrow(n/WORD_BITS + 1);
74 reg[n/WORD_BITS] |= (word(1) << (n%WORD_BITS));
75 }
76 else
77 {
78 if (n/WORD_BITS < reg.size())
79 reg[n/WORD_BITS] &= ~(word(1) << (n%WORD_BITS));
80 }
81}
82
83byte PolynomialMod2::GetByte(size_t n) const
84{

Callers 5

integer.cppFile · 0.80
MonomialMethod · 0.80
TrinomialMethod · 0.80
PentanomialMethod · 0.80
DivideMethod · 0.80

Calls 2

CleanGrowMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected