mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 20:52:30 +02:00
Ensure zero-inialization, add TODO update gitignore.
This commit is contained in:
parent
c939dec26a
commit
62ac53563c
8 changed files with 35 additions and 19 deletions
8
aes.h
8
aes.h
|
@ -140,7 +140,13 @@ namespace crypto
|
|||
{
|
||||
public:
|
||||
|
||||
CBCEncryption () { memset (m_LastBlock.buf, 0, 16); };
|
||||
CBCEncryption () { memset (m_LastBlock.buf, 0, 16); };
|
||||
CBCEncryption(const AESKey& key, const uint8_t* iv)
|
||||
: CBCEncryption()
|
||||
{
|
||||
SetKey(key);
|
||||
SetIV(iv);
|
||||
};
|
||||
|
||||
void SetKey (const AESKey& key) { m_ECBEncryption.SetKey (key); }; // 32 bytes
|
||||
void SetIV (const uint8_t * iv) { memcpy (m_LastBlock.buf, iv, 16); }; // 16 bytes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue