Dash Core  0.12.2.1
P2P Digital Currency
governance-keys.h
Go to the documentation of this file.
1 
2 
3 #include <string>
4 #include <vector>
5 #include <map>
6 
7 vector<SecureString> vGovernanceKeys;
9 
10 /*
11 
12  Notes:
13 
14  - Users will configure their keys, something like this:
15 
16  dash.conf:
17 
18  addgovkey=PrivKey1:name1 #comments
19  addgovkey=PrivKey2:name2 #comments
20 
21  - Each of these will be securely secured in memory, then parsed and the secret will be used temporarily while
22  creating a new goverance object which requires a signature
23 */
24 
25 /*
26  Simple contained to also hold the key and key name.
27 */
29 {
30 private:
33 
34 public:
35  CGovernanceKey::CGovernanceKey(SecureString& strKeyIn, SecureString& strNameIn) {strName = strNameIn; strKey = strKeyIn;}
36 
37  bool GetKey(CBitcoinSecret& secret)
38  {
39  return secret.SetString(vecTokenized[0]);
40  }
41 
42  std::string GetName()
43  {
44  return strName;
45  }
46 };
47 
49 {
50  static bool CGovernanceKeyManager::InitGovernanceKeys(std::string strError);
51 };
bool SetString(const char *pszSecret)
Definition: base58.cpp:329
CGovernanceKey(SecureString &strKeyIn, SecureString &strNameIn)
static bool InitGovernanceKeys(std::string strError)
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:61
vector< SecureString > vGovernanceKeys
bool GetKey(CBitcoinSecret &secret)
std::string GetName()
SecureString strName
CCriticalSection cs_vGovernanceKeys
SecureString strKey