| 424 | // See https://github.com/kokke/tiny-AES-c/pull/34 |
| 425 | #if MULTIPLY_AS_A_FUNCTION |
| 426 | static uint8_t Multiply(uint8_t x, uint8_t y) |
| 427 | { |
| 428 | return (((y & 1) * x) ^ |
| 429 | ((y>>1 & 1) * xtime(x)) ^ |
| 430 | ((y>>2 & 1) * xtime(xtime(x))) ^ |
| 431 | ((y>>3 & 1) * xtime(xtime(xtime(x)))) ^ |
| 432 | ((y>>4 & 1) * xtime(xtime(xtime(xtime(x)))))); /* this last call to xtime() can be omitted */ |
| 433 | } |
| 434 | #else |
| 435 | #define Multiply(x, y) \ |
| 436 | ( ((y & 1) * x) ^ \ |
no test coverage detected