Botan 3.5.0
Crypto and TLS for C&
|
#include <mode_pad.h>
Public Member Functions | |
void | add_padding (secure_vector< uint8_t > &buffer, size_t final_block_bytes, size_t block_size) const override |
std::string | name () const override |
size_t | unpad (const uint8_t[], size_t) const override |
bool | valid_blocksize (size_t bs) const override |
Static Public Member Functions | |
static std::unique_ptr< BlockCipherModePaddingMethod > | create (std::string_view algo_spec) |
ESP Padding (RFC 4303)
Definition at line 112 of file mode_pad.h.
|
overridevirtual |
Add padding bytes to buffer.
buffer | data to pad |
final_block_bytes | size of the final block in bytes |
block_size | size of each block in bytes |
Implements Botan::BlockCipherModePaddingMethod.
Definition at line 251 of file mode_pad.cpp.
References BOTAN_DEBUG_ASSERT, Botan::CT::poison(), and Botan::CT::unpoison().
|
staticinherited |
Get a block cipher padding mode by name (eg "NoPadding" or "PKCS7")
algo_spec | block cipher padding mode name |
Get a block cipher padding method by name
Definition at line 19 of file mode_pad.cpp.
Referenced by Botan::Cipher_Mode::create().
|
inlineoverridevirtual |
Implements Botan::BlockCipherModePaddingMethod.
Definition at line 120 of file mode_pad.h.
|
overridevirtual |
Remove padding bytes from block
block | the last block |
len | the size of the block in bytes |
Implements Botan::BlockCipherModePaddingMethod.
Definition at line 290 of file mode_pad.cpp.
References Botan::CT::Mask< T >::is_equal(), Botan::CT::Mask< T >::is_gt(), Botan::CT::Mask< T >::is_zero(), Botan::CT::poison(), Botan::CT::unpoison(), and valid_blocksize().
|
inlineoverridevirtual |
block_size | of the cipher |
Implements Botan::BlockCipherModePaddingMethod.
Definition at line 118 of file mode_pad.h.
Referenced by unpad().