7#ifndef LOGICALACCESS_KEYSTORAGE_HPP
8#define LOGICALACCESS_KEYSTORAGE_HPP
30 public std::enable_shared_from_this<KeyStorage>
33 using XmlSerializable::serialize;
34 using XmlSerializable::unSerialize;
48 static std::shared_ptr<KeyStorage> getKeyStorageFromType(
KeyStorageType kst);
50 void serialize(boost::property_tree::ptree &parentNode)
override;
52 void unSerialize(boost::property_tree::ptree &node)
override;
57 std::string getMetadata(
const std::string &key);
63 bool hasMetadata(
const std::string &key)
const;
68 void addMetadata(
const std::string &key,
const std::string &value);
A Key storage base class. The key storage specify where the key is stored in memory....
Definition: keystorage.hpp:31
virtual KeyStorageType getType() const =0
Get the key storage type.
std::map< std::string, std::string > metadata_
Definition: keystorage.hpp:71
virtual ~KeyStorage()=default
A Xml Serializable base class. Add Xml serialization to a class.
Definition: xmlserializable.hpp:54
KeyStorageType
The key storage types.
Definition: keystorage.hpp:17
@ KST_PKCS
Definition: keystorage.hpp:22
@ KST_READER_MEMORY
Definition: keystorage.hpp:19
@ KST_SERVER
Definition: keystorage.hpp:21
@ KST_SAM
Definition: keystorage.hpp:20
@ KST_COMPUTER_MEMORY
Definition: keystorage.hpp:18