![]() |
#2
rjsp2018-03-19 18:44
|
void SubBytes(byte mtx[4*4])
{
for(int i=0; i<16; ++i)
{
int row = mtx[i][7]*8 + mtx[i][6]*4 + mtx[i][5]*2 + mtx[i][4];
int col = mtx[i][3]*8 + mtx[i][2]*4 + mtx[i][1]*2 + mtx[i][0];
mtx[i] = S_Box[row][col];
}
}