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

#include <eme_raw.h>

Inheritance diagram for Botan::EME_Raw:
Botan::EME

Public Member Functions

 EME_Raw ()=default
 
secure_vector< uint8_t > encode (const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator &rng) const
 
secure_vector< uint8_t > encode (const secure_vector< uint8_t > &in, size_t key_length, RandomNumberGenerator &rng) const
 
size_t maximum_input_size (size_t i) const override
 

Detailed Description

Definition at line 14 of file eme_raw.h.

Constructor & Destructor Documentation

◆ EME_Raw()

Botan::EME_Raw::EME_Raw ( )
default

Member Function Documentation

◆ encode() [1/2]

secure_vector< uint8_t > Botan::EME::encode ( const uint8_t  in[],
size_t  in_length,
size_t  key_length,
RandomNumberGenerator rng 
) const
inherited

Encode an input

Parameters
inthe plaintext
in_lengthlength of plaintext in bytes
key_lengthlength of the key in bits
rnga random number generator
Returns
encoded plaintext

Definition at line 76 of file eme.cpp.

References Botan::EME::pad().

79  {
80  return pad(msg, msg_len, key_bits, rng);
81  }
virtual secure_vector< uint8_t > pad(const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator &rng) const =0

◆ encode() [2/2]

secure_vector< uint8_t > Botan::EME::encode ( const secure_vector< uint8_t > &  in,
size_t  key_length,
RandomNumberGenerator rng 
) const
inherited

Encode an input

Parameters
inthe plaintext
key_lengthlength of the key in bits
rnga random number generator
Returns
encoded plaintext

Definition at line 86 of file eme.cpp.

References Botan::EME::pad().

89  {
90  return pad(msg.data(), msg.size(), key_bits, rng);
91  }
virtual secure_vector< uint8_t > pad(const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator &rng) const =0

◆ maximum_input_size()

size_t Botan::EME_Raw::maximum_input_size ( size_t  keybits) const
overridevirtual

Return the maximum input size in bytes we can support

Parameters
keybitsthe size of the key in bits
Returns
upper bound of input in bytes

Implements Botan::EME.

Definition at line 27 of file eme_raw.cpp.

28  {
29  return keybits / 8;
30  }

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