Botan  1.11.15
Public Member Functions
Botan::BlockCipherModePaddingMethod Class Reference

#include <mode_pad.h>

Inheritance diagram for Botan::BlockCipherModePaddingMethod:
Botan::ANSI_X923_Padding Botan::Null_Padding Botan::OneAndZeros_Padding Botan::PKCS7_Padding

List of all members.

Public Member Functions

virtual void add_padding (secure_vector< byte > &buffer, size_t final_block_bytes, size_t block_size) const =0
virtual std::string name () const =0
virtual size_t unpad (const byte block[], size_t size) const =0
virtual bool valid_blocksize (size_t block_size) const =0
virtual ~BlockCipherModePaddingMethod ()

Detailed Description

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.


Constructor & Destructor Documentation

virtual destructor

Definition at line 53 of file mode_pad.h.

{}

Member Function Documentation

virtual void Botan::BlockCipherModePaddingMethod::add_padding ( secure_vector< byte > &  buffer,
size_t  final_block_bytes,
size_t  block_size 
) const [pure virtual]
virtual std::string Botan::BlockCipherModePaddingMethod::name ( ) const [pure virtual]
virtual size_t Botan::BlockCipherModePaddingMethod::unpad ( const byte  block[],
size_t  size 
) const [pure virtual]
Parameters:
blockthe last block
sizethe of the block

Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.

Referenced by Botan::ECB_Decryption::finish(), and Botan::CBC_Decryption::finish().

virtual bool Botan::BlockCipherModePaddingMethod::valid_blocksize ( size_t  block_size) const [pure virtual]
Parameters:
block_sizeof the cipher
Returns:
valid block size for this padding mode

Implemented in Botan::Null_Padding, Botan::OneAndZeros_Padding, Botan::ANSI_X923_Padding, and Botan::PKCS7_Padding.


The documentation for this class was generated from the following file: