plebble
cfg1.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 #ifndef USGOV_f6953615b74a0604cb0ab84de1c7b7bed3fa40f4ef7e8920ab18e18fa71df3b7
18 #define USGOV_f6953615b74a0604cb0ab84de1c7b7bed3fa40f4ef7e8920ab18e18fa71df3b7
19 
20 #include <string>
21 #include <utility>
22 #include "cfg0.h"
23 #include <us/gov/crypto.h>
24 #include <us/gov/config.h>
25 
26 namespace us { namespace gov {
27 namespace io {
28 using namespace std;
29 
30 struct cfg1: cfg0 {
31  typedef cfg0 b;
33  virtual ~cfg1();
34 
35  static const char* KO_97832;
36  static const char* KO_96857;
37  static const char* KO_30291;
38  static const char* KO_50493;
39  static const char* KO_60987;
40 
41 
42  cfg1(const keys_t::priv_t& privk, const string& home);
43  cfg1(const cfg1& other);
44  static pair<us::ko,keys_t::priv_t> load_sk(const string& home);
45  static string k_file(const string& home);
46  static ko write_k(const string& home, const keys_t::priv_t& priv);
47  static pair<ko,cfg1*> load(const string& home, bool gen);
48 
50 };
51 
52 typedef cfg1 cfg_id;
53 
54 }
55 }}
56 
57 #endif
us::gov::io::cfg1::keys
keys_t keys
Definition: cfg1.h:49
us::gov::io::cfg1::~cfg1
virtual ~cfg1()
us.ko
Definition: ko.java:20
c
us::gov::io::cfg1 c
Definition: cfg1.cpp:32
us::gov::io::cfg1::cfg1
cfg1(const keys_t::priv_t &privk, const string &home)
cfg0.h
us
Definition: daemon.h:22
cfg1.h
us::gov::io::cfg1::cfg1
cfg1(const cfg1 &other)
us.pair.first
f first
Definition: pair.java:20
us::gov::io::cfg1::b
cfg0 b
Definition: cfg1.h:31
us::gov::crypto::ec::keys::pub_t::valid
bool valid
Definition: ec.h:71
us::gov::io::cfg1::KO_30291
static const char * KO_30291
Definition: cfg1.h:37
us::gov::io::cfg1::load
static pair< ko, cfg1 * > load(const string &home, bool gen)
us::gov::io::cfg1::write_k
static ko write_k(const string &home, const keys_t::priv_t &priv)
us::gov::io::cfg1
Definition: cfg1.h:30
us::gov::io::cfg1::KO_97832
static const char * KO_97832
Definition: cfg1.h:35
us::gov::io::cfg1::KO_60987
static const char * KO_60987
Definition: cfg1.h:39
crypto.h
us.pair.second
s second
Definition: pair.java:21
us::gov::crypto::ec::keys::priv_t
Definition: ec.h:77
us::gov::io::cfg_id
cfg1 cfg_id
Definition: cfg1.h:52
us::ko
const ko_t * ko
Definition: ko.h:27
us::gov::io
Definition: cfg.h:26
us::gov::io::cfg0
Definition: cfg0.h:31
us::gov::crypto::ec::keys::generate
static keys generate()
us::gov::crypto::ec::keys::pub
pub_t pub
Definition: ec.h:99
us::ok
static constexpr ko ok
Definition: ko.h:28
us::gov::crypto::ec::keys::verify
static bool verify(const priv_t &privkey)
us::gov::cash::keys
crypto::ec::keys keys
Definition: app.h:52
us::gov::io::cfg1::keys_t
crypto::ec::keys keys_t
Definition: cfg1.h:32
std
Definition: app.h:380
us::gov::io::cfg1::k_file
static string k_file(const string &home)
us::gov::io::cfg1::KO_96857
static const char * KO_96857
Definition: cfg1.h:36
us::gov::crypto::ec::keys
Definition: ec.h:43
config.h
us.pair
Definition: pair.java:19
gov.h
us::gov::io::cfg1::KO_50493
static const char * KO_50493
Definition: cfg1.h:38
log
#define log
Definition: gov.h:83
us::gov::io::cfg1::load_sk
static pair< us::ko, keys_t::priv_t > load_sk(const string &home)