24#ifndef KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
25#define KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
32#include <mysqld_error.h>
39namespace service_implementation {
59template <
typename Backend,
typename Data_extension = data::Data>
61 const char *data_id,
const char *auth_id,
const char *data_type,
68 ER_NOTE_KEYRING_COMPONENT_NOT_INITIALIZED);
72 if (data_id ==
nullptr || !*data_id) {
74 ER_NOTE_KEYRING_COMPONENT_EMPTY_DATA_ID);
81 ER_NOTE_KEYRING_COMPONENT_WRITE_MAXIMUM_DATA_LENGTH,
87 if (keyring_operations.
generate(metadata, data_type, data_size) ==
true) {
89 ER_NOTE_KEYRING_COMPONENT_GENERATE_FAILED, data_id,
90 (auth_id ==
nullptr || !*auth_id) ?
"NULL" : auth_id);
95 LogComponentErr(
ERROR_LEVEL, ER_KEYRING_COMPONENT_EXCEPTION,
"generate",
Keyring operations A class to perform operations on keyring.
Definition: operations.h:483
bool generate(const meta::Metadata &metadata, const data::Type type, size_t length)
Generate API.
Definition: operations.h:633
size_t maximum_data_length() const
Maximum data length supported.
Definition: operations.h:779
Definition: service_requirements.h:36
bool keyring_initialized()
Keyring component status.
Definition: component_callbacks.cc:29
@ ERROR_LEVEL
Definition: my_loglevel.h:43
@ INFORMATION_LEVEL
Definition: my_loglevel.h:45
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:60
Definition: keyring_encryption_service_definition.h:32