如何从位操作的角度理解以下c#代码行
a = 15 & ( a ^ (b << 3));
以及以下代码段中的位操作,尤其是声明uint8_t a
和uint8_t b
int decode(const void* raw_in, void* raw_out, uint32_t password, size_t len)
{
## some code here ##
const uint8_t* in = (const uint8_t*)raw_in;
uint32_t seed = password ^ 0x48879c19u;
for (size_t i = 0 ; i < len; ++i) {
uint8_t a = (in[i] << 4) ^ seed;
uint8_t b = (((uint32_t)in[i]) << 7 ^ seed) >> 11;
.......