24#ifndef KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
25#define KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
32#include <mysqld_error.h>
58template <
typename Backend,
typename Data_extension = data::Data>
60 const char *data_id,
const char *auth_id,
const char *data_type,
67 ER_NOTE_KEYRING_COMPONENT_NOT_INITIALIZED);
71 if (data_id ==
nullptr || !*data_id) {
73 ER_NOTE_KEYRING_COMPONENT_EMPTY_DATA_ID);
80 ER_NOTE_KEYRING_COMPONENT_WRITE_MAXIMUM_DATA_LENGTH,
86 if (keyring_operations.
generate(metadata, data_type, data_size)) {
88 ER_NOTE_KEYRING_COMPONENT_GENERATE_FAILED, data_id,
89 (auth_id ==
nullptr || !*auth_id) ?
"NULL" : auth_id);
94 LogComponentErr(
ERROR_LEVEL, ER_KEYRING_COMPONENT_EXCEPTION,
"generate",
Keyring operations A class to perform operations on keyring.
Definition: operations.h:482
bool generate(const meta::Metadata &metadata, const data::Type type, size_t length)
Generate API.
Definition: operations.h:632
size_t maximum_data_length() const
Maximum data length supported.
Definition: operations.h:778
Definition: service_requirements.h:35
bool keyring_initialized()
Keyring component status.
Definition: component_callbacks.cc:28
@ ERROR_LEVEL
Definition: my_loglevel.h:43
@ INFORMATION_LEVEL
Definition: my_loglevel.h:45
Definition: keyring_encryption_service_impl_template.h:56
bool generate_template(const char *data_id, const char *auth_id, const char *data_type, size_t data_size, Keyring_operations< Backend, Data_extension > &keyring_operations, Component_callbacks &callbacks)
Generate data and store in keyring.
Definition: keyring_generator_service_impl_template.h:59