Reformatting.
This commit is contained in:
39
Storage.hpp
39
Storage.hpp
@@ -17,32 +17,31 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class Storage
|
||||
{
|
||||
class Storage {
|
||||
public:
|
||||
using KeyHandle = uint32_t;
|
||||
using KeyCount = uint32_t;
|
||||
using AppParam = std::array<uint8_t, 32>;
|
||||
using PrivKey = std::array<uint8_t, 32>;
|
||||
using PubKey = std::array<uint8_t, 65>;
|
||||
using KeyCount = uint32_t;
|
||||
using AppParam = std::array<uint8_t, 32>;
|
||||
using PrivKey = std::array<uint8_t, 32>;
|
||||
using PubKey = std::array<uint8_t, 65>;
|
||||
|
||||
protected:
|
||||
Storage() = default;
|
||||
protected:
|
||||
Storage() = default;
|
||||
|
||||
static std::string filename;
|
||||
static std::string filename;
|
||||
|
||||
public:
|
||||
static void init(const std::string &dirPrefix = "");
|
||||
static void init(std::istream &inputStream);
|
||||
static void save();
|
||||
static void save(std::ostream &outputStream);
|
||||
static std::map<KeyHandle, AppParam> appParams;
|
||||
static std::map<KeyHandle, PrivKey> privKeys;
|
||||
static std::map<KeyHandle, PubKey> pubKeys;
|
||||
static std::map<KeyHandle, KeyCount> keyCounts;
|
||||
public:
|
||||
static void init(const std::string& dirPrefix = "");
|
||||
static void init(std::istream& inputStream);
|
||||
static void save();
|
||||
static void save(std::ostream& outputStream);
|
||||
static std::map<KeyHandle, AppParam> appParams;
|
||||
static std::map<KeyHandle, PrivKey> privKeys;
|
||||
static std::map<KeyHandle, PubKey> pubKeys;
|
||||
static std::map<KeyHandle, KeyCount> keyCounts;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user