|
|
|
@ -124,11 +124,19 @@ namespace crypto
@@ -124,11 +124,19 @@ namespace crypto
|
|
|
|
|
else |
|
|
|
|
#endif |
|
|
|
|
{ |
|
|
|
|
// TODO: implement it better
|
|
|
|
|
if (((size_t)buf | (size_t)other.buf) & 0x03) // multiple of 4 ?
|
|
|
|
|
{ |
|
|
|
|
// we are good to cast to uint32_t *
|
|
|
|
|
for (int i = 0; i < 4; i++) |
|
|
|
|
((uint32_t *)buf)[i] ^= ((uint32_t *)other.buf)[i]; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
for (int i = 0; i < 16; i++) |
|
|
|
|
buf[i] ^= other.buf[i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef i2p::data::Tag<32> AESKey; |
|
|
|
|