Function lbcrypto::get_6bits_atoffset

Function Documentation

inline unsigned char lbcrypto::get_6bits_atoffset(uint64_t m_value, uint32_t index)

Extracts the 6-bit group of a 64-bit value that ends at bit position index (1-based, counted from the least significant bit): bits [index-6, index) for index > 6, or the lowest index bits for index <= 6. Throws for index == 0.

Parameters
  • m_value – value to extract from

  • index – 1-based position of the most significant bit of the group

Returns

the extracted 6-bit value