GpgFrontend-Doxygen/docs/html/classGpgFrontend_1_1KeyPackageOperator.html
2022-05-08 22:01:23 +00:00

390 lines
19 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.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GpgFrontend Project: GpgFrontend::KeyPackageOperator Class Reference</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.8.17 -->
<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');
/* @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('classGpgFrontend_1_1KeyPackageOperator.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="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="classGpgFrontend_1_1KeyPackageOperator-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">GpgFrontend::KeyPackageOperator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>give the possibility to import or export a key package
<a href="classGpgFrontend_1_1KeyPackageOperator.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="KeyPackageOperator_8h_source.html">KeyPackageOperator.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for GpgFrontend::KeyPackageOperator:</div>
<div class="dyncontent">
<div class="center"><img src="classGpgFrontend_1_1KeyPackageOperator__coll__graph.png" border="0" usemap="#GpgFrontend_1_1KeyPackageOperator_coll__map" alt="Collaboration graph"/></div>
<map name="GpgFrontend_1_1KeyPackageOperator_coll__map" id="GpgFrontend_1_1KeyPackageOperator_coll__map">
<area shape="rect" title="give the possibility to import or export a key package" alt="" coords="5,5,252,141"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a6d9cf022a1e0cf54c061495f59c1b4b9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#a6d9cf022a1e0cf54c061495f59c1b4b9">GeneratePassphrase</a> (const std::filesystem::path &amp;phrase_path, std::string &amp;phrase)</td></tr>
<tr class="memdesc:a6d9cf022a1e0cf54c061495f59c1b4b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate passphrase for key package and save it to file <a href="classGpgFrontend_1_1KeyPackageOperator.html#a6d9cf022a1e0cf54c061495f59c1b4b9">More...</a><br /></td></tr>
<tr class="separator:a6d9cf022a1e0cf54c061495f59c1b4b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae90b362a32b6f6014cda1dc232bd3f0e"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#ae90b362a32b6f6014cda1dc232bd3f0e">GenerateKeyPackageName</a> ()</td></tr>
<tr class="memdesc:ae90b362a32b6f6014cda1dc232bd3f0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate the name of the key package <a href="classGpgFrontend_1_1KeyPackageOperator.html#ae90b362a32b6f6014cda1dc232bd3f0e">More...</a><br /></td></tr>
<tr class="separator:ae90b362a32b6f6014cda1dc232bd3f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade02f022e405e98377343c4667c206e9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#ade02f022e405e98377343c4667c206e9">GenerateKeyPackage</a> (const std::filesystem::path &amp;key_package_path, const std::string &amp;key_package_name, KeyIdArgsListPtr &amp;key_ids, std::string &amp;phrase, bool secret)</td></tr>
<tr class="memdesc:ade02f022e405e98377343c4667c206e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate key package <a href="classGpgFrontend_1_1KeyPackageOperator.html#ade02f022e405e98377343c4667c206e9">More...</a><br /></td></tr>
<tr class="separator:ade02f022e405e98377343c4667c206e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89538b180a42eb7d6ae53583fe10ee07"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#a89538b180a42eb7d6ae53583fe10ee07">ImportKeyPackage</a> (const std::filesystem::path &amp;key_package_path, const std::filesystem::path &amp;phrase_path, <a class="el" href="classGpgFrontend_1_1GpgImportInformation.html">GpgFrontend::GpgImportInformation</a> &amp;import_info)</td></tr>
<tr class="memdesc:a89538b180a42eb7d6ae53583fe10ee07"><td class="mdescLeft">&#160;</td><td class="mdescRight">import key package <a href="classGpgFrontend_1_1KeyPackageOperator.html#a89538b180a42eb7d6ae53583fe10ee07">More...</a><br /></td></tr>
<tr class="separator:a89538b180a42eb7d6ae53583fe10ee07"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a825d987dacd8a99d9d87729e1861a152"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#a825d987dacd8a99d9d87729e1861a152">generate_key_package_name</a> ()</td></tr>
<tr class="memdesc:a825d987dacd8a99d9d87729e1861a152"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate key package name <a href="classGpgFrontend_1_1KeyPackageOperator.html#a825d987dacd8a99d9d87729e1861a152">More...</a><br /></td></tr>
<tr class="separator:a825d987dacd8a99d9d87729e1861a152"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>give the possibility to import or export a key package </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a825d987dacd8a99d9d87729e1861a152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a825d987dacd8a99d9d87729e1861a152">&#9670;&nbsp;</a></span>generate_key_package_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::string GpgFrontend::KeyPackageOperator::generate_key_package_name </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate key package name </p>
<dl class="section return"><dt>Returns</dt><dd>std::string key package name </dd></dl>
<p>&lt; Random device</p>
<p>&lt; Mersenne twister</p>
<p class="reference">Referenced by <a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#ae90b362a32b6f6014cda1dc232bd3f0e">GenerateKeyPackageName()</a>.</p>
</div>
</div>
<a id="ade02f022e405e98377343c4667c206e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade02f022e405e98377343c4667c206e9">&#9670;&nbsp;</a></span>GenerateKeyPackage()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool GpgFrontend::KeyPackageOperator::GenerateKeyPackage </td>
<td>(</td>
<td class="paramtype">const std::filesystem::path &amp;&#160;</td>
<td class="paramname"><em>key_package_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>key_package_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">KeyIdArgsListPtr &amp;&#160;</td>
<td class="paramname"><em>key_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string &amp;&#160;</td>
<td class="paramname"><em>phrase</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>secret</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate key package </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key_package_path</td><td>path to key package </td></tr>
<tr><td class="paramname">key_package_name</td><td>name of the key package </td></tr>
<tr><td class="paramname">key_ids</td><td>key ids to export </td></tr>
<tr><td class="paramname">phrase</td><td>passphrase to encrypt key package </td></tr>
<tr><td class="paramname">secret</td><td>true if secret key should be exported </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if key package was generated </dd>
<dd>
false if key package was not generated </dd></dl>
<p class="reference">References <a class="el" href="classGpgFrontend_1_1SingletonFunctionObject.html#a70484d7cfe9f9dcbcd5f8bb749250f36">GpgFrontend::SingletonFunctionObject&lt; GpgKeyImportExporter &gt;::GetInstance()</a>, and <a class="el" href="classGpgFrontend_1_1FileOperator.html#a51121c94dc32a83d7073fbe7138b603b">GpgFrontend::FileOperator::WriteFileStd()</a>.</p>
</div>
</div>
<a id="ae90b362a32b6f6014cda1dc232bd3f0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae90b362a32b6f6014cda1dc232bd3f0e">&#9670;&nbsp;</a></span>GenerateKeyPackageName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::string GpgFrontend::KeyPackageOperator::GenerateKeyPackageName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate the name of the key package </p>
<dl class="section return"><dt>Returns</dt><dd>std::string name of the key package </dd></dl>
<p class="reference">References <a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html#a825d987dacd8a99d9d87729e1861a152">generate_key_package_name()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classGpgFrontend_1_1UI_1_1ExportKeyPackageDialog.html#a7d1899302ef743671c3002d04f6c9dd8">GpgFrontend::UI::ExportKeyPackageDialog::ExportKeyPackageDialog()</a>.</p>
</div>
</div>
<a id="a6d9cf022a1e0cf54c061495f59c1b4b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d9cf022a1e0cf54c061495f59c1b4b9">&#9670;&nbsp;</a></span>GeneratePassphrase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool GpgFrontend::KeyPackageOperator::GeneratePassphrase </td>
<td>(</td>
<td class="paramtype">const std::filesystem::path &amp;&#160;</td>
<td class="paramname"><em>phrase_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string &amp;&#160;</td>
<td class="paramname"><em>phrase</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate passphrase for key package and save it to file </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">phrase_path</td><td>path to passphrase file </td></tr>
<tr><td class="paramname">phrase</td><td>passphrase generated </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if passphrase was generated and saved </dd>
<dd>
false if passphrase was not generated and saved </dd></dl>
<p class="reference">References <a class="el" href="classGpgFrontend_1_1PassphraseGenerator.html#a8b4ee1083343fba6d947b85cd66079b8">GpgFrontend::PassphraseGenerator::Generate()</a>, <a class="el" href="classGpgFrontend_1_1SingletonFunctionObject.html#a70484d7cfe9f9dcbcd5f8bb749250f36">GpgFrontend::SingletonFunctionObject&lt; PassphraseGenerator &gt;::GetInstance()</a>, and <a class="el" href="classGpgFrontend_1_1FileOperator.html#a51121c94dc32a83d7073fbe7138b603b">GpgFrontend::FileOperator::WriteFileStd()</a>.</p>
</div>
</div>
<a id="a89538b180a42eb7d6ae53583fe10ee07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89538b180a42eb7d6ae53583fe10ee07">&#9670;&nbsp;</a></span>ImportKeyPackage()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool GpgFrontend::KeyPackageOperator::ImportKeyPackage </td>
<td>(</td>
<td class="paramtype">const std::filesystem::path &amp;&#160;</td>
<td class="paramname"><em>key_package_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::filesystem::path &amp;&#160;</td>
<td class="paramname"><em>phrase_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classGpgFrontend_1_1GpgImportInformation.html">GpgFrontend::GpgImportInformation</a> &amp;&#160;</td>
<td class="paramname"><em>import_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>import key package </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key_package_path</td><td>path to key package </td></tr>
<tr><td class="paramname">phrase_path</td><td>path to passphrase file </td></tr>
<tr><td class="paramname">import_info</td><td>import info </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if key package was imported </dd>
<dd>
false if key package was not imported </dd></dl>
<p class="reference">References <a class="el" href="classGpgFrontend_1_1SingletonFunctionObject.html#a70484d7cfe9f9dcbcd5f8bb749250f36">GpgFrontend::SingletonFunctionObject&lt; GpgKeyImportExporter &gt;::GetInstance()</a>, <a class="el" href="classGpgFrontend_1_1GpgKeyImportExporter.html#ab7a9be5283047695cd47562775adf79d">GpgFrontend::GpgKeyImportExporter::ImportKey()</a>, and <a class="el" href="classGpgFrontend_1_1FileOperator.html#ad4424bce4f22ae75a16c542dfb4ddf0a">GpgFrontend::FileOperator::ReadFileStd()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/core/function/<a class="el" href="KeyPackageOperator_8h_source.html">KeyPackageOperator.h</a></li>
<li>src/core/function/KeyPackageOperator.cpp</li>
</ul>
</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="namespaceGpgFrontend.html">GpgFrontend</a></li><li class="navelem"><a class="el" href="classGpgFrontend_1_1KeyPackageOperator.html">KeyPackageOperator</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>