mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-22 23:25:37 +02:00
16 bytes alignmen of AES block
This commit is contained in:
parent
f7d90648e3
commit
357a9a6a56
3 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue