
please wait
|
|
unsigned char
is an integer type that has the size of a byte.&key
gives you a pointer to the key value. The type of the pointer is T* (pointer to T).(unsigned char*)&key
casts the pointer to an unsigned char* (pointer to unsigned char). This will allow you read the bytes in the key value.(unsigned char*)&key + i
moves the pointer i positions forward. If i is 0 it will give you a pointer to the first byte, if i is 1 it gives you a pointer to the second byte, and so on.*((unsigned char*)&key + i)
dereferences the pointer, which means you read what the pointer points to.i[(unsigned char*)&key]
.