mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
121 lines
17 KiB
HTML
121 lines
17 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.14"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Dash Core: src/drafted/governance-keys.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(initResizable);
|
|
/* @license-end */</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="bitcoin_logo_doxygen.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Dash Core
|
|
 <span id="projectnumber">0.12.2.1</span>
|
|
</div>
|
|
<div id="projectbrief">P2P Digital Currency</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('governance-keys_8h_source.html','');});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">governance-keys.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="governance-keys_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="governance-keys_8h.html#ab97b3bb0687b551f98d2105c3c5743e6"> 7</a></span> vector<SecureString> <a class="code" href="governance-keys_8h.html#ab97b3bb0687b551f98d2105c3c5743e6">vGovernanceKeys</a>;</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="governance-keys_8h.html#ab3942c398849f11062e9d8271fdb9235"> 8</a></span> <a class="code" href="classAnnotatedMixin.html">CCriticalSection</a> <a class="code" href="governance-keys_8h.html#ab3942c398849f11062e9d8271fdb9235">cs_vGovernanceKeys</a>;</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">/*</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> </span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> Notes:</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> </span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> - Users will configure their keys, something like this:</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> dash.conf:</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> addgovkey=PrivKey1:name1 #comments</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> addgovkey=PrivKey2:name2 #comments</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> - Each of these will be securely secured in memory, then parsed and the secret will be used temporarily while </span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> creating a new goverance object which requires a signature</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">*/</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">/*</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> Simple contained to also hold the key and key name.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">*/</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html"> 28</a></span> <span class="keyword">class </span><a class="code" href="classCGovernanceKey.html">CGovernanceKey</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html#aee136a71e6309f4e07c2c8b690e8f744"> 31</a></span>  <a class="code" href="secure_8h.html#a396ed773a5ac24aec28c8f7dc413c7ac">SecureString</a> <a class="code" href="classCGovernanceKey.html#aee136a71e6309f4e07c2c8b690e8f744">strName</a>;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html#aca29396f2656ae433b55f3197f776fe7"> 32</a></span>  <a class="code" href="secure_8h.html#a396ed773a5ac24aec28c8f7dc413c7ac">SecureString</a> <a class="code" href="classCGovernanceKey.html#aca29396f2656ae433b55f3197f776fe7">strKey</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html#a3c30d6bc7307128adb85f148d03b2c49"> 35</a></span>  <a class="code" href="classCGovernanceKey.html#a3c30d6bc7307128adb85f148d03b2c49">CGovernanceKey::CGovernanceKey</a>(<a class="code" href="secure_8h.html#a396ed773a5ac24aec28c8f7dc413c7ac">SecureString</a>& strKeyIn, <a class="code" href="secure_8h.html#a396ed773a5ac24aec28c8f7dc413c7ac">SecureString</a>& strNameIn) {<a class="code" href="classCGovernanceKey.html#aee136a71e6309f4e07c2c8b690e8f744">strName</a> = strNameIn; <a class="code" href="classCGovernanceKey.html#aca29396f2656ae433b55f3197f776fe7">strKey</a> = strKeyIn;}</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html#af5f07b3bc32fe1a5f7bbd70227729fba"> 37</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classCGovernanceKey.html#af5f07b3bc32fe1a5f7bbd70227729fba">GetKey</a>(<a class="code" href="classCBitcoinSecret.html">CBitcoinSecret</a>& secret)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">return</span> secret.<a class="code" href="classCBitcoinSecret.html#a6a8aff02f66099f33f573ad3e6375bb1">SetString</a>(vecTokenized[0]);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classCGovernanceKey.html#ab8e0c31ddd9ba195466c06d0fd453331"> 42</a></span>  std::string <a class="code" href="classCGovernanceKey.html#ab8e0c31ddd9ba195466c06d0fd453331">GetName</a>()</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">return</span> <a class="code" href="classCGovernanceKey.html#aee136a71e6309f4e07c2c8b690e8f744">strName</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> };</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classCGovernanceKeyManager.html"> 48</a></span> <span class="keyword">class </span><a class="code" href="classCGovernanceKeyManager.html">CGovernanceKeyManager</a></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classCGovernanceKeyManager.html#a5141115a30a0297ced33539f0b300dc3">CGovernanceKeyManager::InitGovernanceKeys</a>(std::string strError);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> };</div><div class="ttc" id="classCBitcoinSecret_html_a6a8aff02f66099f33f573ad3e6375bb1"><div class="ttname"><a href="classCBitcoinSecret.html#a6a8aff02f66099f33f573ad3e6375bb1">CBitcoinSecret::SetString</a></div><div class="ttdeci">bool SetString(const char *pszSecret)</div><div class="ttdef"><b>Definition:</b> <a href="base58_8cpp_source.html#l00329">base58.cpp:329</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html_a3c30d6bc7307128adb85f148d03b2c49"><div class="ttname"><a href="classCGovernanceKey.html#a3c30d6bc7307128adb85f148d03b2c49">CGovernanceKey::CGovernanceKey</a></div><div class="ttdeci">CGovernanceKey(SecureString &strKeyIn, SecureString &strNameIn)</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00035">governance-keys.h:35</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKeyManager_html_a5141115a30a0297ced33539f0b300dc3"><div class="ttname"><a href="classCGovernanceKeyManager.html#a5141115a30a0297ced33539f0b300dc3">CGovernanceKeyManager::InitGovernanceKeys</a></div><div class="ttdeci">static bool InitGovernanceKeys(std::string strError)</div></div>
|
|
<div class="ttc" id="secure_8h_html_a396ed773a5ac24aec28c8f7dc413c7ac"><div class="ttname"><a href="secure_8h.html#a396ed773a5ac24aec28c8f7dc413c7ac">SecureString</a></div><div class="ttdeci">std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString</div><div class="ttdef"><b>Definition:</b> <a href="secure_8h_source.html#l00061">secure.h:61</a></div></div>
|
|
<div class="ttc" id="classAnnotatedMixin_html"><div class="ttname"><a href="classAnnotatedMixin.html">AnnotatedMixin< boost::recursive_mutex ></a></div></div>
|
|
<div class="ttc" id="governance-keys_8h_html_ab97b3bb0687b551f98d2105c3c5743e6"><div class="ttname"><a href="governance-keys_8h.html#ab97b3bb0687b551f98d2105c3c5743e6">vGovernanceKeys</a></div><div class="ttdeci">vector< SecureString > vGovernanceKeys</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00007">governance-keys.h:7</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html_af5f07b3bc32fe1a5f7bbd70227729fba"><div class="ttname"><a href="classCGovernanceKey.html#af5f07b3bc32fe1a5f7bbd70227729fba">CGovernanceKey::GetKey</a></div><div class="ttdeci">bool GetKey(CBitcoinSecret &secret)</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00037">governance-keys.h:37</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html_ab8e0c31ddd9ba195466c06d0fd453331"><div class="ttname"><a href="classCGovernanceKey.html#ab8e0c31ddd9ba195466c06d0fd453331">CGovernanceKey::GetName</a></div><div class="ttdeci">std::string GetName()</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00042">governance-keys.h:42</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKeyManager_html"><div class="ttname"><a href="classCGovernanceKeyManager.html">CGovernanceKeyManager</a></div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00048">governance-keys.h:48</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html_aee136a71e6309f4e07c2c8b690e8f744"><div class="ttname"><a href="classCGovernanceKey.html#aee136a71e6309f4e07c2c8b690e8f744">CGovernanceKey::strName</a></div><div class="ttdeci">SecureString strName</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00031">governance-keys.h:31</a></div></div>
|
|
<div class="ttc" id="classCBitcoinSecret_html"><div class="ttname"><a href="classCBitcoinSecret.html">CBitcoinSecret</a></div><div class="ttdef"><b>Definition:</b> <a href="base58_8h_source.html#l00126">base58.h:126</a></div></div>
|
|
<div class="ttc" id="governance-keys_8h_html_ab3942c398849f11062e9d8271fdb9235"><div class="ttname"><a href="governance-keys_8h.html#ab3942c398849f11062e9d8271fdb9235">cs_vGovernanceKeys</a></div><div class="ttdeci">CCriticalSection cs_vGovernanceKeys</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00008">governance-keys.h:8</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html_aca29396f2656ae433b55f3197f776fe7"><div class="ttname"><a href="classCGovernanceKey.html#aca29396f2656ae433b55f3197f776fe7">CGovernanceKey::strKey</a></div><div class="ttdeci">SecureString strKey</div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00032">governance-keys.h:32</a></div></div>
|
|
<div class="ttc" id="classCGovernanceKey_html"><div class="ttname"><a href="classCGovernanceKey.html">CGovernanceKey</a></div><div class="ttdef"><b>Definition:</b> <a href="governance-keys_8h_source.html#l00028">governance-keys.h:28</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b9c2d76b8d87ab57b9e4cbb92ceb7126.html">drafted</a></li><li class="navelem"><a class="el" href="governance-keys_8h.html">governance-keys.h</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:02 for Dash Core by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|