Botan 1.10.17

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

`#include <mode_pad.h>`

Inheritance diagram for Botan::Null_Padding:

## Public Member Functions
std::string | name () const
void | pad (byte[], size_t, size_t) const
size_t | pad_bytes (size_t, size_t) const
size_t | unpad (const byte[], size_t size) const
bool | valid_blocksize (size_t) const

## Detailed Description

Null Padding

Definition at line 108 of file mode_pad.h.

## Member Function Documentation

## ◆ name()

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

Returns
  name of the mode

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 115 of file mode_pad.h.

115 { return "NoPadding"; }

## ◆ pad()

void Botan::Null_Padding::pad | ( | byte | block[],
|  | size_t | size,
|  | size_t | current_position
| ) |  | const
| inline virtual

Parameters

  block | output buffer
  size | of the block
  current_position | in the last block

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 111 of file mode_pad.h.

111 { return; }

## ◆ pad_bytes()

size_t Botan::Null_Padding::pad_bytes | ( | size_t | block_size,
|  | size_t | position
| ) |  | const
| inline virtual

Parameters

  block_size | of the cipher
  position | in the current block

Returns
  number of padding bytes that will be appended

Reimplemented from Botan::BlockCipherModePaddingMethod.

Definition at line 113 of file mode_pad.h.

113 { return 0; }

## ◆ unpad()

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

Parameters

  block | the last block
  size | the of the block

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 112 of file mode_pad.h.

112 { return size; }

## ◆ valid_blocksize()

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

Parameters

  block_size | of the cipher

Returns
  valid block size for this padding mode

Implements Botan::BlockCipherModePaddingMethod.

Definition at line 114 of file mode_pad.h.

114 { return true; }

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

- src/filters/modes/mode_pad/mode_pad.h