diff options
author | lloyd <[email protected]> | 2008-11-10 02:53:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 02:53:24 +0000 |
commit | cabd8859a0cd87cf78ef1a48a8d59bf4a6fae81c (patch) | |
tree | cb9a786f4129e4861bd63b7c5152981304e945bf /src/modes/cbc | |
parent | ba1271baf1ccbc0302971e7300229d0dec0405ab (diff) |
Remove support for block cipher padding methods in engine. Like S2K,
they were not used at all outside of the core library implementations.
One change is that now get_bc_pad returns a new object, instead of a
pointer to a const shared padding method. This does imply a bit more
dynamic memory overhead, but the modes are pretty light (stateless, for
the most part), so this doesn't seem like a big deal. So modify ECB and
CBC classes to add destructors to delete the padding object.
Diffstat (limited to 'src/modes/cbc')
-rw-r--r-- | src/modes/cbc/cbc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modes/cbc/cbc.h b/src/modes/cbc/cbc.h index 3069d6cb5..238780067 100644 --- a/src/modes/cbc/cbc.h +++ b/src/modes/cbc/cbc.h @@ -20,6 +20,8 @@ class BOTAN_DLL CBC_Encryption : public BlockCipherMode CBC_Encryption(BlockCipher*, const BlockCipherModePaddingMethod*); CBC_Encryption(BlockCipher*, const BlockCipherModePaddingMethod*, const SymmetricKey&, const InitializationVector&); + + ~CBC_Encryption() { delete padder; } private: std::string name() const; void write(const byte[], u32bit); @@ -36,6 +38,8 @@ class BOTAN_DLL CBC_Decryption : public BlockCipherMode CBC_Decryption(BlockCipher*, const BlockCipherModePaddingMethod*); CBC_Decryption(BlockCipher*, const BlockCipherModePaddingMethod*, const SymmetricKey&, const InitializationVector&); + + ~CBC_Decryption() { delete padder; } private: std::string name() const; void write(const byte[], u32bit); |