class_crypto_parameters.html

来自「Crypto++是一个非常强大的密码学库,主要是功能全」· HTML 代码 · 共 395 行 · 第 1/3 页

HTML
395
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Crypto++: CryptoParameters class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>CryptoParameters Class Reference</h1><code>#include &lt;<a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>&gt;</code><p><p>Inheritance diagram for CryptoParameters:<p><center><img src="class_crypto_parameters.png" usemap="#CryptoParameters_map" border="0" alt=""></center><map name="CryptoParameters_map"><area href="class_generatable_crypto_material.html" alt="GeneratableCryptoMaterial" shape="rect" coords="1992,112,2978,136"><area href="class_crypto_material.html" alt="CryptoMaterial" shape="rect" coords="1992,56,2978,80"><area href="class_name_value_pairs.html" alt="NameValuePairs" shape="rect" coords="1992,0,2978,24"><area href="class_d_l___group_parameters.html" alt="DL_GroupParameters< T >" shape="rect" coords="0,224,986,248"><area href="class_d_l___group_parameters.html" alt="DL_GroupParameters< Integer >" shape="rect" coords="996,224,1982,248"><area href="class_d_l___group_parameters.html" alt="DL_GroupParameters< typenameEcPrecomputation< EC >::Element >" shape="rect" coords="2988,224,3974,248"><area href="class_x_t_r___d_h.html" alt="XTR_DH" shape="rect" coords="3984,224,4970,248"><area href="class_d_l___group_parameters___integer_based.html" alt="DL_GroupParameters_IntegerBased" shape="rect" coords="996,280,1982,304"><area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< EcPrecomputation< EC > >" shape="rect" coords="2988,280,3974,304"><area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< DL_GroupPrecomputation_LUC, DL_BasePrecomputation_LUC, DL_GroupParameters_IntegerBased >" shape="rect" coords="0,336,986,360"><area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< GROUP_PRECOMP, BASE_PRECOMP, DL_GroupParameters_IntegerBased >" shape="rect" coords="996,336,1982,360"><area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< ModExpPrecomputation, DL_FixedBasePrecomputationImpl< typenameModExpPrecomputation::Element >, DL_GroupParameters_IntegerBased >" shape="rect" coords="1992,336,2978,360"><area href="class_d_l___group_parameters___e_c.html" alt="DL_GroupParameters_EC< EC >" shape="rect" coords="2988,336,3974,360"><area href="class_d_l___group_parameters___integer_based_impl.html" alt="DL_GroupParameters_IntegerBasedImpl< DL_GroupPrecomputation_LUC, DL_BasePrecomputation_LUC >" shape="rect" coords="0,392,986,416"><area href="class_d_l___group_parameters___integer_based_impl.html" alt="DL_GroupParameters_IntegerBasedImpl< GROUP_PRECOMP, BASE_PRECOMP >" shape="rect" coords="996,392,1982,416"><area href="class_d_l___group_parameters___integer_based_impl.html" alt="DL_GroupParameters_IntegerBasedImpl< ModExpPrecomputation >" shape="rect" coords="1992,392,2978,416"><area href="class_d_l___group_parameters___l_u_c.html" alt="DL_GroupParameters_LUC" shape="rect" coords="0,448,986,472"><area href="class_d_l___group_parameters___g_f_p.html" alt="DL_GroupParameters_GFP" shape="rect" coords="1992,448,2978,472"><area href="class_d_l___group_parameters___l_u_c___default_safe_prime.html" alt="DL_GroupParameters_LUC_DefaultSafePrime" shape="rect" coords="0,504,986,528"><area href="class_d_l___group_parameters___d_s_a.html" alt="DL_GroupParameters_DSA" shape="rect" coords="1494,504,2480,528"><area href="class_d_l___group_parameters___g_f_p___default_safe_prime.html" alt="DL_GroupParameters_GFP_DefaultSafePrime" shape="rect" coords="2490,504,3476,528"></map><a href="class_crypto_parameters-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>interface for crypto prameters <p><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01037">1037</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha27">GenerateRandom</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &amp;params=<a class="el" href="cryptlib_8h.html#a3">g_nullNameValuePairs</a>)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">generate a random key or crypto parameters </em> <a href="#_x_t_r___d_ha27"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha28" doxytag="CryptoParameters::GenerateRandomWithKeySize"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha28">GenerateRandomWithKeySize</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, unsigned int keySize)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">calls the above function with a <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> object that just specifies "KeySize" <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x509_public_keya11">AssignFrom</a> (const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &amp;source)=0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">assign values from source to this object </em> <a href="#_x509_public_keya11"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x509_public_keya12">Validate</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, unsigned int level) const=0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check this object for errors </em> <a href="#_x509_public_keya12"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha29" doxytag="CryptoParameters::ThrowIfInvalid"></a>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha29">ThrowIfInvalid</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, unsigned int level) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">throws <a class="el" href="class_crypto_material_1_1_invalid_material.html">InvalidMaterial</a> if this object fails <a class="el" href="class_crypto_material.html#_x509_public_keya12">Validate()</a> test <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha30" doxytag="CryptoParameters::Save"></a>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha30">Save</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">save key into a <a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha31">Load</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load key from a <a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> </em> <a href="#_x_t_r___d_ha31"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha32" doxytag="CryptoParameters::SupportsPrecomputation"></a>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha32">SupportsPrecomputation</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><dl compact><dt><b>Returns:</b></dt><dd>whether this object supports precomputation </dd></dl><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha33">Precompute</a> (unsigned int n)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">do precomputation </em> <a href="#_x_t_r___d_ha33"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha34" doxytag="CryptoParameters::LoadPrecomputation"></a>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha34">LoadPrecomputation</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;storedPrecomputation)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">retrieve previously saved precomputation <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha35" doxytag="CryptoParameters::SavePrecomputation"></a>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha35">SavePrecomputation</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;storedPrecomputation) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">save precomputation for later use <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha36" doxytag="CryptoParameters::DoQuickSanityCheck"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><b>DoQuickSanityCheck</b> () const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha37" doxytag="CryptoParameters::GetThisObject"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha37">GetThisObject</a> (T &amp;object) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a copy of this object or a subobject of it <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha38" doxytag="CryptoParameters::GetThisPointer"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha38">GetThisPointer</a> (T *&amp;p) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a pointer to this object, as a pointer to T <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha39" doxytag="CryptoParameters::GetValue"></a>template&lt;class T&gt; bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha39">GetValue</a> (const char *name, T &amp;value) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value, returns true if the name exists <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha40" doxytag="CryptoParameters::GetValueWithDefault"></a>template&lt;class T&gt; T&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha40">GetValueWithDefault</a> (const char *name, T defaultValue) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value, returns the default if the name doesn't exist <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha41" doxytag="CryptoParameters::GetValueNames"></a>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha41">GetValueNames</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a list of value names that can be retrieved <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha42">GetIntValue</a> (const char *name, int &amp;value) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value with type int </em> <a href="#_x_t_r___d_ha42"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha43" doxytag="CryptoParameters::GetIntValueWithDefault"></a>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_ha43">GetIntValueWithDefault</a> (const char *name, int defaultValue) const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a named value with type int, with default <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha44" doxytag="CryptoParameters::GetRequiredParameter"></a>template&lt;class T&gt; void&nbsp;</td><td class="memItemRight" valign=bottom><b>GetRequiredParameter</b> (const char *className, const char *name, T &amp;value) const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha45" doxytag="CryptoParameters::GetRequiredIntParameter"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><b>GetRequiredIntParameter</b> (const char *className, const char *name, int &amp;value) const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x509_public_keya28" doxytag="CryptoParameters::GetVoidValue"></a>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x509_public_keya28">GetVoidValue</a> (const char *name, const std::type_info &amp;valueType, void *pValue) const=0</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">to be implemented by derived classes, users should use one of the above functions instead <br><br></td></tr><tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_he0" doxytag="CryptoParameters::ThrowIfTypeMismatch"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_crypto_parameters.html#_x_t_r___d_he0">ThrowIfTypeMismatch</a> (const char *name, const std::type_info &amp;stored, const std::type_info &amp;retrieving)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">used by derived classes to check for type mismatch <br><br></td></tr></table><hr><h2>Member Function Documentation</h2><a name="_x_t_r___d_ha27" doxytag="CryptoParameters::GenerateRandom"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>

⌨️ 快捷键说明

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