⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_x_t_r___d_h.html

📁 Crypto++是一个非常强大的密码学库,主要是功能全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
    </td>    <td><p>check this object for errors <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>level</em>&nbsp;</td><td>denotes the level of thoroughness: 0 - using this object won't cause a crash or exception (rng is ignored) 1 - this object will probably function (encrypt, sign, etc.) correctly (but may not check for weak keys and such) 2 - make sure this object will function correctly, and do reasonable security checks 3 - do checks that may take a long time </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>true if the tests pass </dd></dl><p>Implements <a class="el" href="class_crypto_material.html#_x509_public_keya12">CryptoMaterial</a>.<p>Definition at line <a class="el" href="xtrcrypt_8cpp-source.html#l00041">41</a> of file <a class="el" href="xtrcrypt_8cpp-source.html">xtrcrypt.cpp</a>.<p>References <a class="el" href="xtr_8h-source.html#l00038">GFP2Element::c1</a>, <a class="el" href="xtr_8h-source.html#l00038">GFP2Element::c2</a>, <a class="el" href="integer_8h-source.html#l00221">Integer::IsNegative()</a>, <a class="el" href="integer_8h-source.html#l00231">Integer::IsOdd()</a>, <a class="el" href="integer_8cpp-source.html#l02616">Integer::One()</a>, and <a class="el" href="integer_8h-source.html#l00345">Integer::Squared()</a>.    </td>  </tr></table><a name="_x_t_r___d_ha6" doxytag="XTR_DH::AssignFrom"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void XTR_DH::AssignFrom </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>assign values from source to this object <p><dl compact><dt><b>Note:</b></dt><dd>This function can be used to create a public key from a private key. </dd></dl><p>Implements <a class="el" href="class_crypto_material.html#_x509_public_keya11">CryptoMaterial</a>.<p>Definition at line <a class="el" href="xtrcrypt_8cpp-source.html#l00068">68</a> of file <a class="el" href="xtrcrypt_8cpp-source.html">xtrcrypt.cpp</a>.<p>References <a class="el" href="argnames_8h-source.html#l00027">Name::Modulus()</a>, <a class="el" href="argnames_8h-source.html#l00033">Name::SubgroupGenerator()</a>, and <a class="el" href="argnames_8h-source.html#l00031">Name::SubgroupOrder()</a>.    </td>  </tr></table><a name="_x_t_r___d_ha11" doxytag="XTR_DH::GeneratePrivateKey"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void XTR_DH::GeneratePrivateKey </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>rng</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>byte *&nbsp;</td>          <td class="mdname" nowrap> <em>privateKey</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>generate private key <p><dl compact><dt><b>Precondition:</b></dt><dd>size of privateKey == <a class="el" href="class_x_t_r___d_h.html#_x_t_r___d_ha9">PrivateKeyLength()</a> </dd></dl><p>Implements <a class="el" href="class_simple_key_agreement_domain.html#_simple_key_agreement_domaina3">SimpleKeyAgreementDomain</a>.<p>Definition at line <a class="el" href="xtrcrypt_8cpp-source.html#l00077">77</a> of file <a class="el" href="xtrcrypt_8cpp-source.html">xtrcrypt.cpp</a>.<p>References <a class="el" href="xtrcrypt_8h-source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="integer_8cpp-source.html#l02610">Integer::Zero()</a>.    </td>  </tr></table><a name="_x_t_r___d_ha12" doxytag="XTR_DH::GeneratePublicKey"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void XTR_DH::GeneratePublicKey </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>rng</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const byte *&nbsp;</td>          <td class="mdname" nowrap> <em>privateKey</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>byte *&nbsp;</td>          <td class="mdname" nowrap> <em>publicKey</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>generate public key <p><dl compact><dt><b>Precondition:</b></dt><dd>size of publicKey == <a class="el" href="class_x_t_r___d_h.html#_x_t_r___d_ha10">PublicKeyLength()</a> </dd></dl><p>Implements <a class="el" href="class_simple_key_agreement_domain.html#_simple_key_agreement_domaina4">SimpleKeyAgreementDomain</a>.<p>Definition at line <a class="el" href="xtrcrypt_8cpp-source.html#l00083">83</a> of file <a class="el" href="xtrcrypt_8cpp-source.html">xtrcrypt.cpp</a>.<p>References <a class="el" href="xtr_8h-source.html#l00021">GFP2Element::Encode()</a>, <a class="el" href="xtrcrypt_8h-source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="xtrcrypt_8h-source.html#l00031">PublicKeyLength()</a>.    </td>  </tr></table><a name="_x_t_r___d_ha13" doxytag="XTR_DH::Agree"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool XTR_DH::Agree </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">byte *&nbsp;</td>          <td class="mdname" nowrap> <em>agreedValue</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const byte *&nbsp;</td>          <td class="mdname" nowrap> <em>privateKey</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const byte *&nbsp;</td>          <td class="mdname" nowrap> <em>otherPublicKey</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>validateOtherPublicKey</em> = true</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>derive agreed value from your private key and couterparty's public key, return false in case of failure <p><dl compact><dt><b>Note:</b></dt><dd>If you have previously validated the public key, use validateOtherPublicKey=false to save time. /*! </dd></dl><dl compact><dt><b>Precondition:</b></dt><dd>size of agreedValue == <a class="el" href="class_x_t_r___d_h.html#_x_t_r___d_ha8">AgreedValueLength()</a> <p>length of privateKey == <a class="el" href="class_x_t_r___d_h.html#_x_t_r___d_ha9">PrivateKeyLength()</a> <p>length of otherPublicKey == <a class="el" href="class_x_t_r___d_h.html#_x_t_r___d_ha10">PublicKeyLength()</a></dd></dl><p>Implements <a class="el" href="class_simple_key_agreement_domain.html#_simple_key_agreement_domaina6">SimpleKeyAgreementDomain</a>.<p>Definition at line <a class="el" href="xtrcrypt_8cpp-source.html#l00090">90</a> of file <a class="el" href="xtrcrypt_8cpp-source.html">xtrcrypt.cpp</a>.<p>References <a class="el" href="xtrcrypt_8h-source.html#l00029">AgreedValueLength()</a>, <a class="el" href="xtr_8h-source.html#l00038">GFP2Element::c1</a>, <a class="el" href="xtr_8h-source.html#l00038">GFP2Element::c2</a>, <a class="el" href="xtr_8h-source.html#l00056">GFP2_ONB&lt; F &gt;::ConvertIn()</a>, <a class="el" href="integer_8h-source.html#l00221">Integer::IsNegative()</a>, <a class="el" href="xtrcrypt_8h-source.html#l00030">PrivateKeyLength()</a>, and <a class="el" href="xtrcrypt_8h-source.html#l00031">PublicKeyLength()</a>.    </td>  </tr></table><a name="_x_t_r___d_ha20" doxytag="XTR_DH::GenerateKeyPair"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void SimpleKeyAgreementDomain::GenerateKeyPair </td>          <td class="md" valign="top">(&nbsp;</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -