GpgFrontend-Doxygen/docs/html/GpgGenKeyInfo_8h_source.html

226 lines
22 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GpgFrontend Project: src/core/model/GpgGenKeyInfo.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>
<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="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GpgFrontend Project
</div>
<div id="projectbrief">A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('GpgGenKeyInfo_8h_source.html',''); initResizable(); });
/* @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">GpgGenKeyInfo.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend.html">GpgFrontend</a> {</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1GenKeyInfo.html"> 33</a></span>&#160;<span class="keyword">class </span>GPGFRONTEND_CORE_EXPORT <a class="code" href="classGpgFrontend_1_1GenKeyInfo.html">GenKeyInfo</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keyword">using</span> KeyGenAlgo = std::tuple&lt;QString, QString, QString&gt;;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">explicit</span> <a class="code" href="classGpgFrontend_1_1GenKeyInfo.html">GenKeyInfo</a>(<span class="keywordtype">bool</span> m_is_sub_key = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">static</span> <span class="keyword">auto</span> GetSupportedKeyAlgo() -&gt; <span class="keyword">const</span> std::vector&lt;KeyGenAlgo&gt; &amp;;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keyword">static</span> <span class="keyword">auto</span> GetSupportedSubkeyAlgo() -&gt; <span class="keyword">const</span> std::vector&lt;KeyGenAlgo&gt; &amp;;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsSubKey() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordtype">void</span> SetIsSubKey(<span class="keywordtype">bool</span> m_sub_key);</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetUserid() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordtype">void</span> SetName(<span class="keyword">const</span> QString &amp;m_name);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordtype">void</span> SetEmail(<span class="keyword">const</span> QString &amp;m_email);</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordtype">void</span> SetComment(<span class="keyword">const</span> QString &amp;m_comment);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetName() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetEmail() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetComment() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetAlgo() <span class="keyword">const</span> -&gt; <span class="keyword">const</span> QString &amp;;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">void</span> SetAlgo(<span class="keyword">const</span> QString &amp;);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetKeySizeStr() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetKeyLength() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordtype">void</span> SetKeyLength(<span class="keywordtype">int</span> m_key_size);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetExpireTime() <span class="keyword">const</span> -&gt; <span class="keyword">const</span> QDateTime &amp;;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keywordtype">void</span> SetExpireTime(<span class="keyword">const</span> QDateTime &amp;m_expired);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsNonExpired() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="keywordtype">void</span> SetNonExpired(<span class="keywordtype">bool</span> m_non_expired);</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsNoPassPhrase() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordtype">void</span> SetNonPassPhrase(<span class="keywordtype">bool</span> m_non_pass_phrase);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowSigning() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowNoPassPhrase() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keywordtype">void</span> SetAllowSigning(<span class="keywordtype">bool</span> m_allow_signing);</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowEncryption() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="keywordtype">void</span> SetAllowEncryption(<span class="keywordtype">bool</span> m_allow_encryption);</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowCertification() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="keywordtype">void</span> SetAllowCertification(<span class="keywordtype">bool</span> m_allow_certification);</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowAuthentication() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="keywordtype">void</span> SetAllowAuthentication(<span class="keywordtype">bool</span> m_allow_authentication);</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetPassPhrase() <span class="keyword">const</span> -&gt; <span class="keyword">const</span> QString &amp;;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <span class="keywordtype">void</span> SetPassPhrase(<span class="keyword">const</span> QString &amp;m_pass_phrase);</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeSigning() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeEncryption() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; </div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeCertification() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeAuthentication() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; </div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSuggestMaxKeySize() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSuggestMinKeySize() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSizeChangeStep() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="keywordtype">bool</span> subkey_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; QString name_; </div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; QString email_; </div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; QString comment_; </div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; </div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; QString algo_; </div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <span class="keywordtype">int</span> key_size_ = 2048;</div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; QDateTime expired_ = QDateTime::currentDateTime().addYears(2);</div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <span class="keywordtype">bool</span> non_expired_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; </div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="keywordtype">bool</span> no_passphrase_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; <span class="keywordtype">bool</span> allow_no_pass_phrase_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; </div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <span class="keywordtype">int</span> suggest_max_key_size_ = 4096; </div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <span class="keywordtype">int</span> suggest_size_addition_step_ = 1024; </div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="keywordtype">int</span> suggest_min_key_size_ = 1024; </div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; </div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; QString passphrase_; </div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; </div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; <span class="keywordtype">bool</span> allow_encryption_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <span class="keywordtype">bool</span> allow_change_encryption_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; <span class="keywordtype">bool</span> allow_certification_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; <span class="keywordtype">bool</span> allow_change_certification_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; <span class="keywordtype">bool</span> allow_authentication_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <span class="keywordtype">bool</span> allow_change_authentication_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; <span class="keywordtype">bool</span> allow_signing_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; <span class="keywordtype">bool</span> allow_change_signing_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; <span class="keywordtype">void</span> reset_options();</div>
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160;};</div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160;} <span class="comment">// namespace GpgFrontend</span></div>
<div class="ttc" id="aclassGpgFrontend_1_1GenKeyInfo_html"><div class="ttname"><a href="classGpgFrontend_1_1GenKeyInfo.html">GpgFrontend::GenKeyInfo</a></div><div class="ttdef"><b>Definition:</b> GpgGenKeyInfo.h:33</div></div>
<div class="ttc" id="anamespaceGpgFrontend_html"><div class="ttname"><a href="namespaceGpgFrontend.html">GpgFrontend</a></div><div class="ttdef"><b>Definition:</b> app.cpp:38</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_aebb8dcc11953d78e620bbef0b9e2183.html">core</a></li><li class="navelem"><a class="el" href="dir_db6209eff64d15a114e6ff7aefbf1abd.html">model</a></li><li class="navelem"><b>GpgGenKeyInfo.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>