Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::Null_Padding Class Referencefinal

`#include <mode_pad.h>`

Inheritance diagram for Botan::Null_Padding:

## Public Member Functions
void | add_padding (secure_vector< uint8_t > &, size_t, size_t) const override
std::string | name () const override
size_t | unpad (const uint8_t[], 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

void Botan::Null_Padding::add_padding | ( | secure_vector< uint8_t > & | buffer,
|  | size_t | final_block_bytes,
|  | size_t | block_size
| ) |  | const
| inline override virtual

Add padding bytes to buffer.

Parameters

  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 139 of file mode_pad.h.

139 {}

std::string Botan::Null_Padding::name | ( |  | ) | const
| inline override virtual

Returns
  name of the mode

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 145 of file mode_pad.h.

145 { return "NoPadding"; }

size_t Botan::Null_Padding::unpad | ( | const uint8_t | block[],
|  | size_t | size
| ) |  | const
| inline override virtual

Remove padding bytes from block

Parameters

  block | the last block
  size | the 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; }

bool Botan::Null_Padding::valid_blocksize | ( | size_t | block_size | ) | const
| inline override virtual

Parameters

  block_size | of 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:

- src/lib/modes/mode_pad/mode_pad.h