Function lbcrypto::reverse_byte

Function Documentation

static inline unsigned char lbcrypto::reverse_byte(unsigned char x)

Method to reverse bits of num and return an unsigned int, for all bits up to an including the designated most significant bit.

Parameters
  • input – an unsigned int

  • msb – the most significant bit. All larger bits are disregarded.

Returns

an unsigned integer that represents the reversed bits.