<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crypto++: TemplatePKCS5_PBKDF2_HMAC< T > class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.7 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div> <h1>PKCS5_PBKDF2_HMAC< T > Class Template Reference</h1><code>#include <<a class="el" href="pwdbased_8h-source.html">pwdbased.h</a>></code> <p> <p>Inheritance diagram for PKCS5_PBKDF2_HMAC< T >: <p><center><img src="class_p_k_c_s5___p_b_k_d_f2___h_m_a_c.png" usemap="#PKCS5_PBKDF2_HMAC< T >_map" border="0" alt=""></center> <map name="PKCS5_PBKDF2_HMAC< T >_map"> <area href="class_password_based_key_derivation_function.html" alt="PasswordBasedKeyDerivationFunction" shape="rect" coords="0,0,231,24"> </map> <a href="class_p_k_c_s5___p_b_k_d_f2___h_m_a_c-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class T><br> class PKCS5_PBKDF2_HMAC< T ></h3> PBKDF2 from PKCS #5, T should be a <a class="el" href="class_hash_transformation.html">HashTransformation</a> class. <p> <p> Definition at line <a class="el" href="pwdbased_8h-source.html#l00037">37</a> of file <a class="el" href="pwdbased_8h-source.html">pwdbased.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><a class="anchor" name="_p_k_c_s5___p_b_k_d_f2___h_m_a_ca0" doxytag="PKCS5_PBKDF2_HMAC::MaxDerivedKeyLength" ></a> unsigned int </td><td class="memItemRight" valign=bottom><b>MaxDerivedKeyLength</b> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="_p_k_c_s5___p_b_k_d_f2___h_m_a_ca1" doxytag="PKCS5_PBKDF2_HMAC::UsesPurposeByte" ></a> bool </td><td class="memItemRight" valign=bottom><b>UsesPurposeByte</b> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k_c_s5___p_b_k_d_f2___h_m_a_c.html#_p_k_c_s5___p_b_k_d_f2___h_m_a_ca2">DeriveKey</a> (byte *derived, unsigned int derivedLen, byte purpose, const byte *password, unsigned int passwordLen, const byte *salt, unsigned int saltLen, unsigned int iterations, double timeInSeconds=0) const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">derive key from password <a href="#_p_k_c_s5___p_b_k_d_f2___h_m_a_ca2"></a><br><br></td></tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="_p_k_c_s5___p_b_k_d_f2___h_m_a_ca2" doxytag="PKCS5_PBKDF2_HMAC::DeriveKey" ></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" colspan="4"> template<class T> </td> </tr> <tr> <td class="md" nowrap valign="top"> unsigned int <a class="el" href="class_p_k_c_s5___p_b_k_d_f2___h_m_a_c.html">PKCS5_PBKDF2_HMAC</a>< T >::DeriveKey </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">byte * </td> <td class="mdname" nowrap> <em>derived</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>derivedLen</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>byte </td> <td class="mdname" nowrap> <em>purpose</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const byte * </td> <td class="mdname" nowrap> <em>password</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>passwordLen</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const byte * </td> <td class="mdname" nowrap> <em>salt</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>saltLen</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>iterations</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>double </td> <td class="mdname" nowrap> <em>timeInSeconds</em> = <code>0</code></td> </tr> <tr> <td></td> <td class="md">) </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> </td> <td> <p> derive key from password <p> If timeInSeconds != 0, will iterate until time elapsed, as measured by <a class="el" href="class_thread_user_timer.html">ThreadUserTimer</a> Returns actual iteration count, which is equal to iterations if timeInSeconds == 0, and not less than iterations otherwise. <p> Implements <a class="el" href="class_password_based_key_derivation_function.html#_password_based_key_derivation_functiona2">PasswordBasedKeyDerivationFunction</a>. <p> Definition at line <a class="el" href="pwdbased_8h-source.html#l00085">85</a> of file <a class="el" href="pwdbased_8h-source.html">pwdbased.h</a>. <p> References <a class="el" href="cryptlib_8h-source.html#l00552">HashTransformation::CalculateDigest()</a>, <a class="el" href="hmac_8h-source.html#l00022">HMAC_Base::DigestSize()</a>, <a class="el" href="hrtimer_8cpp-source.html#l00035">TimerBase::ElapsedTimeAsDouble()</a>, <a class="el" href="cryptlib_8h-source.html#l00532">HashTransformation::Final()</a>, <a class="el" href="secblock_8h-source.html#l00274">SecBlock< T, A >::size()</a>, <a class="el" href="hrtimer_8cpp-source.html#l00029">TimerBase::StartTimer()</a>, and <a class="el" href="hmac_8cpp-source.html#l00058">HMAC_Base::Update()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="pwdbased_8h-source.html">pwdbased.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Sun Nov 7 08:24:07 2004 for Crypto++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address> </body> </html>