MySQL 9.1.0
Source Code Documentation
|
Key generator service provides a way to generate random data and store it in keyring backend. More...
#include <keyring_generator.h>
Public Attributes | |
mysql_service_status_t(* | generate )(const char *data_id, const char *auth_id, const char *data_type, size_t data_size) |
Generate random data of length data_size and store it in keyring using identifiers as (data_id, auth_id). More... | |
Key generator service provides a way to generate random data and store it in keyring backend.
Data stored within keyring should be uniquely identified using:
This service does not return generated data back to user. For that, Keyring reader service should be used.
mysql_service_status_t(* s_mysql_keyring_generator::generate) (const char *data_id, const char *auth_id, const char *data_type, size_t data_size) |
Generate random data of length data_size and store it in keyring using identifiers as (data_id, auth_id).
Data_type value is implementation specific. It associates type label with data which may be an important indicator for certain backends.
Examples: AES, SECRET
Note: If components want to support aes_encryption service, it must support storing data of type AES.
If error object is not initialized, the method will initialize it if returns false. Caller will be responsible for freeing error state in such cases. No error object will be created or modified if return value is true.
The action should be atomic from caller's point of view. As much as possible, deligate data generation to keyring backend.
[in] | data_id | Data Identifier. Byte string. |
[in] | auth_id | Authorization ID. Byte string. |
[in] | data_type | Type of data. ASCII. Null terminated. |
[in] | data_size | Size of the data to be generated |
false | Success - Key generated and stored in keyring. |
truen | Failure |