When I compile it tells me best overloaded match for method AESEncryption.shiftrow(byte[], byte);
I am still new to C sharp so can somebody tell me?
Code:
public static void shiftRow(byte[] state, byte nbr)
{
int i;
int j;
byte tmp;
// each iteration shifts the row to the left by 1
for (i = 0; i < nbr; i++)
{
tmp = state[0];
for (j = 0; j < 3; j++)
state[j] = state[j + 1];
state[3] = tmp;
}
}
Code 2
Code:
public static void shiftRows(ref byte state)
{
int i;
// iterate over the 4 rows and call shiftRow() with that row
for (i = 0; i < 4; i++)
shiftRow(Convert.ToInt16(state + i * 4), i);
}
I need help with code 2