Botan
1.10.9
|
#include <mode_pad.h>
Public Member Functions | |
virtual std::string | name () const =0 |
virtual void | pad (byte block[], size_t size, size_t current_position) const =0 |
virtual size_t | pad_bytes (size_t block_size, size_t position) const |
virtual size_t | unpad (const byte block[], size_t size) const =0 |
virtual bool | valid_blocksize (size_t block_size) const =0 |
virtual | ~BlockCipherModePaddingMethod () |
Block Cipher Mode Padding Method This class is pretty limited, it cannot deal well with randomized padding methods, or any padding method that wants to add more than one block. For instance, it should be possible to define cipher text stealing mode as simply a padding mode for CBC, which happens to consume the last two block (and requires use of the block cipher).
Definition at line 25 of file mode_pad.h.
|
inlinevirtual |
|
pure virtual |
Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.
Referenced by Botan::CBC_Decryption::CBC_Decryption(), Botan::CBC_Encryption::CBC_Encryption(), Botan::ECB_Encryption::name(), Botan::CBC_Encryption::name(), Botan::ECB_Decryption::name(), and Botan::CBC_Decryption::name().
|
pure virtual |
block | output buffer |
size | of the block |
current_position | in the last block |
Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.
|
virtual |
block_size | of the cipher |
position | in the current block |
Reimplemented in Botan::Null_Padding.
Definition at line 17 of file mode_pad.cpp.
|
pure virtual |
block | the last block |
size | the of the block |
Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.
|
pure virtual |
block_size | of the cipher |
Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.
Referenced by Botan::CBC_Decryption::CBC_Decryption(), and Botan::CBC_Encryption::CBC_Encryption().