Botan  2.12.1
Crypto and TLS for C++11
Public Types | Public Member Functions | List of all members
Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass > Class Template Reference

#include <block_cipher.h>

Inheritance diagram for Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >:

Public Types

enum  { BLOCK_SIZE = BS }
 

Public Member Functions

size_t block_size () const final override
 
void decrypt_n_xex (uint8_t data[], const uint8_t mask[], size_t blocks) const final override
 
void encrypt_n_xex (uint8_t data[], const uint8_t mask[], size_t blocks) const final override
 
Key_Length_Specification key_spec () const final override
 

Detailed Description

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
class Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >

Represents a block cipher with a single fixed block size

Definition at line 221 of file block_cipher.h.

Member Enumeration Documentation

◆ anonymous enum

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
anonymous enum
Enumerator
BLOCK_SIZE 

Definition at line 224 of file block_cipher.h.

Member Function Documentation

◆ block_size()

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
size_t Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >::block_size ( ) const
inlinefinaloverride

Definition at line 225 of file block_cipher.h.

225 { return BS; }

◆ decrypt_n_xex()

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
void Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >::decrypt_n_xex ( uint8_t  data[],
const uint8_t  mask[],
size_t  blocks 
) const
inlinefinaloverride

Definition at line 237 of file block_cipher.h.

240  {
241  xor_buf(data, mask, blocks * BS);
242  this->decrypt_n(data, data, blocks);
243  xor_buf(data, mask, blocks * BS);
244  }
void xor_buf(uint8_t out[], const uint8_t in[], size_t length)
Definition: mem_ops.h:207

◆ encrypt_n_xex()

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
void Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >::encrypt_n_xex ( uint8_t  data[],
const uint8_t  mask[],
size_t  blocks 
) const
inlinefinaloverride

Definition at line 228 of file block_cipher.h.

231  {
232  xor_buf(data, mask, blocks * BS);
233  this->encrypt_n(data, data, blocks);
234  xor_buf(data, mask, blocks * BS);
235  }
void xor_buf(uint8_t out[], const uint8_t in[], size_t length)
Definition: mem_ops.h:207

◆ key_spec()

template<size_t BS, size_t KMIN, size_t KMAX = 0, size_t KMOD = 1, typename BaseClass = BlockCipher>
Key_Length_Specification Botan::Block_Cipher_Fixed_Params< BS, KMIN, KMAX, KMOD, BaseClass >::key_spec ( ) const
inlinefinaloverride

Definition at line 246 of file block_cipher.h.

247  {
248  return Key_Length_Specification(KMIN, KMAX, KMOD);
249  }

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