32#include <openssl/evp.h>
64 const std::string &
mode,
size_t block_size);
84 unsigned int source_length,
unsigned char *dest,
85 const unsigned char *
key,
unsigned int key_length,
87 bool padding,
size_t *encrypted_length);
90 unsigned int source_length,
unsigned char *dest,
91 const unsigned char *
key,
unsigned int key_length,
93 bool padding,
size_t *decrypted_length);
std::string data_id_
Definition: aes.h:73
Keyring_aes_opmode opmode() const
Definition: aes.h:68
std::string data_id() const
Definition: aes.h:66
std::string auth_id() const
Definition: aes.h:67
bool valid() const
Definition: aes.h:69
Keyring_aes_opmode opmode_
Definition: aes.h:75
bool valid_
Definition: aes.h:76
Aes_operation_context(std::string data_id, std::string auth_id, const std::string &mode, size_t block_size)
Definition: aes.cc:47
std::string auth_id_
Definition: aes.h:74
static const Known_block_mode_map s_blockmodes
Definition: aes.h:70
~Aes_operation_context()=default
aes_return_status
Definition: aes.h:47
@ AES_OP_OK
Definition: aes.h:48
@ AES_DECRYPTION_ERROR
Definition: aes.h:55
@ AES_IV_EMPTY
Definition: aes.h:53
@ AES_CTX_ALLOCATION_ERROR
Definition: aes.h:51
@ AES_INVALID_BLOCK_MODE
Definition: aes.h:52
@ AES_KEY_TRANSFORMATION_ERROR
Definition: aes.h:50
@ AES_OUTPUT_SIZE_NULL
Definition: aes.h:49
@ AES_ENCRYPTION_ERROR
Definition: aes.h:54
const EVP_CIPHER * aes_evp_type(const Keyring_aes_opmode mode)
Definition: aes.cc:70
aes_return_status aes_decrypt(const unsigned char *source, unsigned int source_length, unsigned char *dest, const unsigned char *key, unsigned int key_length, enum Keyring_aes_opmode mode, const unsigned char *iv, bool padding, size_t *decrypted_length)
Definition: aes.cc:187
aes_return_status aes_encrypt(const unsigned char *source, unsigned int source_length, unsigned char *dest, const unsigned char *key, unsigned int key_length, Keyring_aes_opmode mode, const unsigned char *iv, bool padding, size_t *encrypted_length)
Definition: aes.cc:137
Keyring_aes_opmode
Supported AES cipher/block mode combos.
Definition: aes.h:37
@ keyring_aes_opmode_invalid
std::pair< std::string, size_t > block_mode_key
Definition: aes.h:58
size_t get_ciphertext_size(size_t input_size, const Keyring_aes_opmode mode)
Definition: aes.cc:127
std::map< block_mode_key, Keyring_aes_opmode > Known_block_mode_map
Definition: aes.h:59
mode
Definition: file_handle.h:61
required string key
Definition: replication_asynchronous_connection_failover.proto:60
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42