24#ifndef KEYRING_FILE_BACKEND_INCLUDED
25#define KEYRING_FILE_BACKEND_INCLUDED
Sensitive data storage.
Definition: data.h:39
Definition: json_writer.h:42
size_t num_elements() const
Number of elements stored.
Definition: json_writer.cc:148
Keyring operations A class to perform operations on keyring.
Definition: operations.h:482
std::string keyring_file_name_
Keyring file.
Definition: backend.h:135
~Keyring_file_backend()=default
bool load_cache(keyring_common::operations::Keyring_operations< Keyring_file_backend > &operations)
Populate cache.
Definition: backend.cc:90
size_t size() const
Get number of elements stored in backend.
Definition: backend.h:114
bool store(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data)
Store data.
Definition: backend.cc:124
keyring_common::json_data::Json_writer json_writer_
In memory cache for keyring data.
Definition: backend.h:141
void create_file_if_missing(const std::string &file_name)
Create data file if missing.
Definition: backend.cc:167
Keyring_file_backend(const std::string &keyring_file_name, bool read_only)
Definition: backend.cc:52
bool generate(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data, size_t length)
Generate random data and store it.
Definition: backend.cc:146
bool write_to_file()
Write existing data to file.
Definition: backend.cc:161
bool get(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data) const
Fetch data.
Definition: backend.cc:119
bool read_only_
Read only flag.
Definition: backend.h:138
size_t maximum_data_length() const
Maximum data length supported.
Definition: backend.h:111
bool erase(const keyring_common::meta::Metadata &metadata, keyring_common::data::Data &data)
Erase data located at given key.
Definition: backend.cc:135
bool valid() const
Validity.
Definition: backend.h:117
bool valid_
Validity.
Definition: backend.h:144
constexpr value_type read_only
Definition: classic_protocol_constants.h:213
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: backend.cc:38
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94