MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / decryptBlock

Method decryptBlock

source/src/tools/aes.h:236–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 for (int j = 0; j < 4; j++) roundKeys[i * 4 + j] = roundKeys[(i - nk) * 4 + j] ^ temp[j];
235 }
236 }
237 static void encryptBlock(const unsigned char* in, unsigned char* out, const unsigned char* roundKeys, int nr)
238 {
239 unsigned char state[4][4];
240 for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) state[j][i] = in[i * 4 + j];
241 addRoundKey(state, roundKeys);
242 for (int round = 1; round < nr; round++) {
243 subBytes(state);
244 shiftRows(state);
245 mixColumns(state);
246 addRoundKey(state, roundKeys + round * 16);
247 }
248 subBytes(state);
249 shiftRows(state);
250 addRoundKey(state, roundKeys + nr * 16);
251 for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) out[i * 4 + j] = state[j][i];
252 }
253 static void decryptBlock(const unsigned char* in, unsigned char* out, const unsigned char* roundKeys, int nr)
254 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected