Newer
Older
#ifndef __VEREIGN_KVSTORE_CRYPTO_STORAGE_HH
#define __VEREIGN_KVSTORE_CRYPTO_STORAGE_HH
#include <vereign/kvstore/storage.hh>
#include <memory>
namespace vereign::kvstore {
namespace detail {
class CryptoStorageImpl;
}
class CryptoStorage {
public:
CryptoStorage(Storage& storage, bool disable_key_protection = false);
~CryptoStorage();
void Reset(const std::string& pin);
void Open(const std::string& pin);
void PutBytes(const std::string& key, bytes::View value);
void GetBytes(const std::string& key, bytes::Buffer& value);
private:
std::unique_ptr<detail::CryptoStorageImpl> impl_;
};
} // namespace vereign::kvstore
#endif // __VEREIGN_KVSTORE_CRYPTO_STORAGE_HH