#include <master_key_file.h>
|
| | MasterKeyFile (const std::string &file) |
| |
| void | load () |
| | load master-key-file from disk. More...
|
| |
| void | save () |
| | save master-key-file to disk. More...
|
| |
| void | add (const std::string &id, const std::string &value, const std::string &key) |
| | add value-key pair to 'id'. More...
|
| |
| void | add_encrypted (const std::string &id, const std::string &buf) |
| | add encrypted buffer to 'id'. More...
|
| |
| std::string | get (const std::string &id, const std::string &key) const |
| | get value for 'key' for 'id'. More...
|
| |
| std::string | get_encrypted (const std::string &id) const |
| | get value encrypted 'key-value' pair for 'id'. More...
|
| |
| bool | remove (const std::string &id) |
| | remove id from master-key-dict. More...
|
| |
| const auto & | entries () const |
| | get entries. More...
|
| |
|
| std::string | path_ |
| |
| std::vector< std::pair< std::string, std::string > > | entries_ |
| |
◆ MasterKeyFile()
| mysql_harness::MasterKeyFile::MasterKeyFile |
( |
const std::string & |
file | ) |
|
|
inline |
◆ add()
| void mysql_harness::MasterKeyFile::add |
( |
const std::string & |
id, |
|
|
const std::string & |
value, |
|
|
const std::string & |
key |
|
) |
| |
add value-key pair to 'id'.
encrypts the value-key pair.
- Exceptions
-
| std::runtime_error | on failure |
◆ add_encrypted()
| void mysql_harness::MasterKeyFile::add_encrypted |
( |
const std::string & |
id, |
|
|
const std::string & |
buf |
|
) |
| |
add encrypted buffer to 'id'.
- Exceptions
-
| std::runtime_error | on failure |
◆ entries()
| const auto & mysql_harness::MasterKeyFile::entries |
( |
| ) |
const |
|
inline |
◆ get()
| std::string mysql_harness::MasterKeyFile::get |
( |
const std::string & |
id, |
|
|
const std::string & |
key |
|
) |
| const |
get value for 'key' for 'id'.
- Returns
- value for 'key' of 'id'.
- Return values
-
| empty | if key or id aren't found |
◆ get_encrypted()
| std::string mysql_harness::MasterKeyFile::get_encrypted |
( |
const std::string & |
id | ) |
const |
get value encrypted 'key-value' pair for 'id'.
- Returns
- encrypted buffer of 'id'.
- Return values
-
| empty | if key or id aren't found |
◆ load()
| void mysql_harness::MasterKeyFile::load |
( |
| ) |
|
load master-key-file from disk.
- Exceptions
-
| std::runtime_error | on failure |
◆ remove()
| bool mysql_harness::MasterKeyFile::remove |
( |
const std::string & |
id | ) |
|
remove id from master-key-dict.
- Returns
- success
- Return values
-
| true | id removed |
| false | id not removed (not found, ...) |
◆ save()
| void mysql_harness::MasterKeyFile::save |
( |
| ) |
|
save master-key-file to disk.
- Exceptions
-
| std::runtime_error | on failure |
◆ entries_
| std::vector<std::pair<std::string, std::string> > mysql_harness::MasterKeyFile::entries_ |
|
private |
◆ path_
| std::string mysql_harness::MasterKeyFile::path_ |
|
private |
The documentation for this class was generated from the following files: