Botan  1.11.15
Public Types | Public Member Functions
Botan::EME Class Reference

#include <eme.h>

Inheritance diagram for Botan::EME:
Botan::EME_PKCS1v15 Botan::OAEP

List of all members.

Public Types

typedef SCAN_Name Spec

Public Member Functions

secure_vector< bytedecode (const byte in[], size_t in_length, size_t key_length) const
secure_vector< bytedecode (const secure_vector< byte > &in, size_t key_length) const
secure_vector< byteencode (const byte in[], size_t in_length, size_t key_length, RandomNumberGenerator &rng) const
secure_vector< byteencode (const secure_vector< byte > &in, size_t key_length, RandomNumberGenerator &rng) const
virtual size_t maximum_input_size (size_t keybits) const =0
virtual ~EME ()

Detailed Description

Encoding Method for Encryption

Definition at line 20 of file eme.h.


Member Typedef Documentation

Definition at line 23 of file eme.h.


Constructor & Destructor Documentation

virtual Botan::EME::~EME ( ) [inline, virtual]

Definition at line 76 of file eme.h.

{}

Member Function Documentation

secure_vector< byte > Botan::EME::decode ( const byte  in[],
size_t  in_length,
size_t  key_length 
) const

Decode an input

Parameters:
inthe encoded plaintext
in_lengthlength of encoded plaintext in bytes
key_lengthlength of the key in bits
Returns:
plaintext

Definition at line 35 of file eme.cpp.

   {
   return unpad(msg, msg_len, key_bits);
   }
secure_vector< byte > Botan::EME::decode ( const secure_vector< byte > &  in,
size_t  key_length 
) const

Decode an input

Parameters:
inthe encoded plaintext
key_lengthlength of the key in bits
Returns:
plaintext

Definition at line 44 of file eme.cpp.

   {
   return unpad(&msg[0], msg.size(), key_bits);
   }
secure_vector< byte > Botan::EME::encode ( const byte  in[],
size_t  in_length,
size_t  key_length,
RandomNumberGenerator rng 
) const

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 15 of file eme.cpp.

   {
   return pad(msg, msg_len, key_bits, rng);
   }
secure_vector< byte > Botan::EME::encode ( const secure_vector< byte > &  in,
size_t  key_length,
RandomNumberGenerator rng 
) const

Encode an input

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

Definition at line 25 of file eme.cpp.

   {
   return pad(&msg[0], msg.size(), key_bits, rng);
   }
virtual size_t Botan::EME::maximum_input_size ( size_t  keybits) const [pure virtual]

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

Implemented in Botan::OAEP, and Botan::EME_PKCS1v15.


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