Botan 3.2.0
Crypto and TLS for C&
|
#include <eme_pkcs.h>
Public Member Functions | |
secure_vector< uint8_t > | encode (const secure_vector< uint8_t > &in, size_t key_length, RandomNumberGenerator &rng) const |
secure_vector< uint8_t > | encode (const uint8_t in[], size_t in_length, size_t key_length, RandomNumberGenerator &rng) const |
size_t | maximum_input_size (size_t) const override |
secure_vector< uint8_t > | pad (const uint8_t[], size_t, size_t, RandomNumberGenerator &) const override |
secure_vector< uint8_t > | unpad (uint8_t &valid_mask, const uint8_t in[], size_t in_len) const override |
Static Public Member Functions | |
static std::unique_ptr< EME > | create (std::string_view algo_spec) |
EME from PKCS #1 v1.5
Definition at line 18 of file eme_pkcs.h.
|
staticinherited |
Factory method for EME (message-encoding methods for encryption) objects
algo_spec | the name of the EME to create |
Definition at line 28 of file eme.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), Botan::HashFunction::create(), and Botan::parse_algorithm_name().
|
inherited |
Encode an input
in | the plaintext |
key_length | length of the key in bits |
rng | a random number generator |
Definition at line 80 of file eme.cpp.
References Botan::EME::pad().
|
inherited |
Encode an input
in | the plaintext |
in_length | length of plaintext in bytes |
key_length | length of the key in bits |
rng | a random number generator |
Definition at line 70 of file eme.cpp.
References Botan::EME::pad().
|
overridevirtual |
Return the maximum input size in bytes we can support
keybits | the size of the key in bits |
Implements Botan::EME.
Definition at line 95 of file eme_pkcs.cpp.
Referenced by pad().
|
overridevirtual |
Encode an input
in | the plaintext |
in_length | length of plaintext in bytes |
key_length | length of the key in bits |
rng | a random number generator |
Implements Botan::EME.
Definition at line 19 of file eme_pkcs.cpp.
References Botan::buffer_insert(), maximum_input_size(), Botan::RandomNumberGenerator::next_nonzero_byte(), and Botan::RandomNumberGenerator::randomize().
|
overridevirtual |
Decode an input
valid_mask | written to specifies if output is valid |
in | the encoded plaintext |
in_len | length of encoded plaintext in bytes |
Implements Botan::EME.
Definition at line 48 of file eme_pkcs.cpp.
References Botan::CT::Mask< T >::cleared(), Botan::CT::copy_output(), Botan::CT::Mask< T >::if_not_set_return(), Botan::CT::Mask< T >::is_zero(), Botan::CT::poison(), and Botan::CT::unpoison().