parent
aff5105569
commit
8134f2cd50
12
modes.cpp
12
modes.cpp
|
|
@ -149,6 +149,12 @@ void BlockOrientedCipherModeBase::UncheckedSetKey(const byte *key, unsigned int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BlockOrientedCipherModeBase::ResizeBuffers()
|
||||||
|
{
|
||||||
|
CipherModeBase::ResizeBuffers();
|
||||||
|
m_buffer.New(BlockSize());
|
||||||
|
}
|
||||||
|
|
||||||
void ECB_OneWay::ProcessData(byte *outString, const byte *inString, size_t length)
|
void ECB_OneWay::ProcessData(byte *outString, const byte *inString, size_t length)
|
||||||
{
|
{
|
||||||
CRYPTOPP_ASSERT(length%BlockSize()==0);
|
CRYPTOPP_ASSERT(length%BlockSize()==0);
|
||||||
|
|
@ -243,6 +249,12 @@ void CBC_CTS_Decryption::ProcessLastBlock(byte *outString, const byte *inString,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBC_Decryption::ResizeBuffers()
|
||||||
|
{
|
||||||
|
BlockOrientedCipherModeBase::ResizeBuffers();
|
||||||
|
m_temp.New(BlockSize());
|
||||||
|
}
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
12
modes.h
12
modes.h
|
|
@ -170,11 +170,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool RequireAlignedInput() const {return true;}
|
bool RequireAlignedInput() const {return true;}
|
||||||
void ResizeBuffers()
|
void ResizeBuffers();
|
||||||
{
|
|
||||||
CipherModeBase::ResizeBuffers();
|
|
||||||
m_buffer.New(BlockSize());
|
|
||||||
}
|
|
||||||
|
|
||||||
SecByteBlock m_buffer;
|
SecByteBlock m_buffer;
|
||||||
};
|
};
|
||||||
|
|
@ -229,11 +225,7 @@ public:
|
||||||
void ProcessData(byte *outString, const byte *inString, size_t length);
|
void ProcessData(byte *outString, const byte *inString, size_t length);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ResizeBuffers()
|
void ResizeBuffers();
|
||||||
{
|
|
||||||
BlockOrientedCipherModeBase::ResizeBuffers();
|
|
||||||
m_temp.New(BlockSize());
|
|
||||||
}
|
|
||||||
AlignedSecByteBlock m_temp;
|
AlignedSecByteBlock m_temp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue