I have two integer a, b and a loop like this:
for(int i=0 ;i<8 ;++i)
{
if((b & (0x01 << i)) != 0x00)
{
//
c ^= (a << i);
}
}
how can i do this when a and b are stored in char arrays?
unsigned char test (unsigned char* a[], unsigned char* b[])
{
for(int i=0 ;i<8 ;++i)
{
if((b[i] & (0x01 << i)) != 0x00)
{
shiftleft(a);
c[i] ^= a;
}
}
}