Botan

ECB/CBC Padding Methods

License
Botan is released under the Simplified BSD License (see LICENSE.md)

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).


abstract const size_t  unpad(const(ubyte)* block, size_t size);

Parameters
const(ubyte)* block the last block
size_t size the of the block

abstract const bool  validBlocksize(size_t block_size);

Parameters
size_t block_size of the cipher
Returns
valid block size for this padding mode

abstract const @property string  name();

Returns
 name of the mode

class  PKCS7Padding: botan.modes.mode_pad.BlockCipherModePaddingMethod;

PKCS#7 Padding


class  ANSIX923Padding: botan.modes.mode_pad.BlockCipherModePaddingMethod;

ANSI X9.23 Padding


class  OneAndZerosPadding: botan.modes.mode_pad.BlockCipherModePaddingMethod;

One And Zeros Padding


class  NullPadding: botan.modes.mode_pad.BlockCipherModePaddingMethod;

Null Padding