mirror of https://github.com/AxioDL/nod.git
Simplify xtime
This commit is contained in:
parent
04e6381eed
commit
ebb5c0743d
|
@ -40,14 +40,7 @@ static inline void unpack(uint32_t a, uint8_t* b)
|
||||||
|
|
||||||
static inline uint8_t xtime(uint8_t a)
|
static inline uint8_t xtime(uint8_t a)
|
||||||
{
|
{
|
||||||
uint8_t b;
|
return ((a << 1) ^ (((a>>7) & 1) * 0x11B));
|
||||||
|
|
||||||
if (a & 0x80) b = 0x1B;
|
|
||||||
else b = 0;
|
|
||||||
|
|
||||||
a <<= 1;
|
|
||||||
a ^= b;
|
|
||||||
return a;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct SoftwareAESTables
|
static const struct SoftwareAESTables
|
||||||
|
|
Loading…
Reference in New Issue