MCPcopy Create free account
hub / github.com/S3N4T0R-0X0/PixelCode-Attack / SubBytes

Function SubBytes

payload.cpp:357–367  ·  view source on GitHub ↗

The SubBytes Function Substitutes the values in the state matrix with values in an S-box.

Source from the content-addressed store, hash-verified

355// The SubBytes Function Substitutes the values in the
356// state matrix with values in an S-box.
357static void SubBytes(state_t* state)
358{
359 uint8_t i, j;
360 for (i = 0; i < 4; ++i)
361 {
362 for (j = 0; j < 4; ++j)
363 {
364 (*state)[j][i] = getSBoxValue((*state)[j][i]);
365 }
366 }
367}
368
369// The ShiftRows() function shifts the rows in the state to the left.
370// Each row is shifted with different offset.

Callers 1

CipherFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected