GpgFrontend-Doxygen/docs/html/GpgGenKeyInfo_8h_source.html

228 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="preprocessor">#include &quot;core/GpgFrontendCoreExport.h&quot;</span></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"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend.html">GpgFrontend</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1GenKeyInfo.html"> 35</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="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">using</span> KeyGenAlgo = std::tuple&lt;QString, QString, QString&gt;;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</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="l00046"></a><span class="lineno"> 46</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</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="l00053"></a><span class="lineno"> 53</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</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="l00060"></a><span class="lineno"> 60</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsSubKey() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">void</span> SetIsSubKey(<span class="keywordtype">bool</span> m_sub_key);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetUserid() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordtype">void</span> SetName(<span class="keyword">const</span> QString &amp;m_name);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordtype">void</span> SetEmail(<span class="keyword">const</span> QString &amp;m_email);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordtype">void</span> SetComment(<span class="keyword">const</span> QString &amp;m_comment);</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetName() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetEmail() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetComment() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</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="l00131"></a><span class="lineno"> 131</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordtype">void</span> SetAlgo(<span class="keyword">const</span> QString &amp;);</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetKeySizeStr() <span class="keyword">const</span> -&gt; QString;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetKeyLength() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordtype">void</span> SetKeyLength(<span class="keywordtype">int</span> m_key_size);</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</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="l00166"></a><span class="lineno"> 166</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keywordtype">void</span> SetExpireTime(<span class="keyword">const</span> QDateTime &amp;m_expired);</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsNonExpired() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordtype">void</span> SetNonExpired(<span class="keywordtype">bool</span> m_non_expired);</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsNoPassPhrase() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordtype">void</span> SetNonPassPhrase(<span class="keywordtype">bool</span> m_non_pass_phrase);</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowSigning() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowNoPassPhrase() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordtype">void</span> SetAllowSigning(<span class="keywordtype">bool</span> m_allow_signing);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowEncryption() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keywordtype">void</span> SetAllowEncryption(<span class="keywordtype">bool</span> m_allow_encryption);</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowCertification() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="keywordtype">void</span> SetAllowCertification(<span class="keywordtype">bool</span> m_allow_certification);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowAuthentication() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; </div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keywordtype">void</span> SetAllowAuthentication(<span class="keywordtype">bool</span> m_allow_authentication);</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</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="l00278"></a><span class="lineno"> 278</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="keywordtype">void</span> SetPassPhrase(<span class="keyword">const</span> QString &amp;m_pass_phrase);</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeSigning() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeEncryption() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; </div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeCertification() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; [[nodiscard]] <span class="keyword">auto</span> IsAllowChangeAuthentication() <span class="keyword">const</span> -&gt; bool;</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSuggestMaxKeySize() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; </div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSuggestMinKeySize() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; [[nodiscard]] <span class="keyword">auto</span> GetSizeChangeStep() <span class="keyword">const</span> -&gt; int;</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; </div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="keywordtype">bool</span> subkey_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; QString name_; </div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; QString email_; </div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; QString comment_; </div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; QString algo_; </div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <span class="keywordtype">int</span> key_size_ = 2048;</div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; QDateTime expired_ = QDateTime::currentDateTime().addYears(2);</div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="keywordtype">bool</span> non_expired_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; </div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; <span class="keywordtype">bool</span> no_passphrase_ = <span class="keyword">false</span>; </div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <span class="keywordtype">bool</span> allow_no_pass_phrase_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="keywordtype">int</span> suggest_max_key_size_ = 4096; </div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; <span class="keywordtype">int</span> suggest_size_addition_step_ = 1024; </div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; <span class="keywordtype">int</span> suggest_min_key_size_ = 1024; </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; QString passphrase_; </div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; </div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; <span class="keywordtype">bool</span> allow_encryption_ = <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_encryption_ = <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_certification_ = <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_certification_ = <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_authentication_ = <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_authentication_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordtype">bool</span> allow_signing_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; <span class="keywordtype">bool</span> allow_change_signing_ = <span class="keyword">true</span>; </div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; </div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; <span class="keywordtype">void</span> reset_options();</div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160;};</div>
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; </div>
<div class="line"><a name="l00375"></a><span class="lineno"> 375</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:35</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:39</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>