16 bytes alignmen of AES block

This commit is contained in:
orignal 2014-11-26 11:04:49 -05:00
parent f7d90648e3
commit 357a9a6a56
3 changed files with 8 additions and 1 deletions

View file

@ -118,6 +118,12 @@ namespace tunnel
uint8_t * GetBuffer () { return buf + offset; };
const uint8_t * GetBuffer () const { return buf + offset; };
size_t GetLength () const { return len - offset; };
void Align (size_t alignment)
{
size_t rem = ((size_t)GetBuffer ()) % alignment;
if (rem)
offset += (alignment - rem);
}
I2NPMessage& operator=(const I2NPMessage& other)
{