ctGetBit
fn
uint ctGetBit(const(ubyte)[] data, size_t bitIndex) pure nothrow @nogc @safeExtracts a bit from a byte array in constant time.
The byte array is treated as a big-endian bit sequence where bit 0 is the least significant bit of the last byte.
Parameters
data | The byte array. |
bitIndex | The index of the bit to extract (0 = LSB of last byte). |
Returns
0 or 1 depending on the bit value.