Botan  1.11.34
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::Null_Padding Class Referencefinal

#include <mode_pad.h>

Inheritance diagram for Botan::Null_Padding:
Botan::BlockCipherModePaddingMethod

Public Member Functions

void add_padding (secure_vector< byte > &, size_t, size_t) const override
 
std::string name () const override
 
size_t unpad (const byte[], size_t size) const override
 
bool valid_blocksize (size_t) const override
 

Detailed Description

Null Padding

Definition at line 136 of file mode_pad.h.

Member Function Documentation

§ add_padding()

void Botan::Null_Padding::add_padding ( secure_vector< byte > &  buffer,
size_t  final_block_bytes,
size_t  block_size 
) const
inlineoverridevirtual

Add padding bytes to buffer.

Parameters
bufferdata to pad
final_block_bytessize of the final block in bytes
block_sizesize of each block in bytes

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 139 of file mode_pad.h.

139 {}

§ name()

std::string Botan::Null_Padding::name ( ) const
inlineoverridevirtual
Returns
name of the mode

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 145 of file mode_pad.h.

References Botan::get_bc_pad().

145 { return "NoPadding"; }

§ unpad()

size_t Botan::Null_Padding::unpad ( const byte  block[],
size_t  size 
) const
inlineoverridevirtual

Remove padding bytes from block

Parameters
blockthe last block
sizethe size of the block in bytes
Returns
number of padding bytes

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 141 of file mode_pad.h.

141 { return size; }

§ valid_blocksize()

bool Botan::Null_Padding::valid_blocksize ( size_t  block_size) const
inlineoverridevirtual
Parameters
block_sizeof the cipher
Returns
valid block size for this padding mode

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 143 of file mode_pad.h.

143 { return true; }

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