<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.5"/> <title>PolarSSL v1.3.8: pbkdf2.h File 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="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 style="padding-left: 0.5em;"> <div id="projectname">PolarSSL v1.3.8 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_6a9bbd12bf4e19a18c45e270f8fae3fd.html">include</a></li><li class="navelem"><a class="el" href="dir_04272d44da4745cf8b8bfc767d6c6523.html">polarssl</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#define-members">Macros</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">pbkdf2.h File Reference</div> </div> </div><!--header--> <div class="contents"> <p>Password-Based Key Derivation Function 2 (from PKCS#5) DEPRECATED: use <a class="el" href="pkcs5_8h.html" title="PKCS#5 functions. ">pkcs5.h</a> instead. <a href="#details">More...</a></p> <div class="textblock"><code>#include <string.h></code><br/> <code>#include "<a class="el" href="md_8h_source.html">md.h</a>"</code><br/> <code>#include <inttypes.h></code><br/> </div><div class="textblock"><div class="dynheader"> Include dependency graph for pbkdf2.h:</div> <div class="dyncontent"> <div class="center"><img src="pbkdf2_8h__incl.png" border="0" usemap="#pbkdf2_8h" alt=""/></div> <map name="pbkdf2_8h" id="pbkdf2_8h"> </map> </div> </div> <p><a href="pbkdf2_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:a32afaed6ae1467f54e0ca0d2550329f9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="pbkdf2_8h.html#a32afaed6ae1467f54e0ca0d2550329f9">POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA</a>   -0x007C</td></tr> <tr class="memdesc:a32afaed6ae1467f54e0ca0d2550329f9"><td class="mdescLeft"> </td><td class="mdescRight">Bad input parameters to function. <a href="#a32afaed6ae1467f54e0ca0d2550329f9">More...</a><br/></td></tr> <tr class="separator:a32afaed6ae1467f54e0ca0d2550329f9"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ad6db50404ba78149d24a051c51365f57"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pbkdf2_8h.html#ad6db50404ba78149d24a051c51365f57">pbkdf2_hmac</a> (<a class="el" href="structmd__context__t.html">md_context_t</a> *ctx, const unsigned char *password, size_t plen, const unsigned char *salt, size_t slen, unsigned int iteration_count, uint32_t key_length, unsigned char *output)</td></tr> <tr class="memdesc:ad6db50404ba78149d24a051c51365f57"><td class="mdescLeft"> </td><td class="mdescRight">PKCS#5 PBKDF2 using HMAC DEPRECATED: Use <a class="el" href="pkcs5_8h.html#acbff7ba1c4b49a208efcf8d6f4060153" title="PKCS#5 PBKDF2 using HMAC. ">pkcs5_pbkdf2_hmac()</a> instead! <a href="#ad6db50404ba78149d24a051c51365f57">More...</a><br/></td></tr> <tr class="separator:ad6db50404ba78149d24a051c51365f57"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae9cd595f1c6bca6c92a2ab7f05773c05"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pbkdf2_8h.html#ae9cd595f1c6bca6c92a2ab7f05773c05">pbkdf2_self_test</a> (int verbose)</td></tr> <tr class="memdesc:ae9cd595f1c6bca6c92a2ab7f05773c05"><td class="mdescLeft"> </td><td class="mdescRight">Checkup routine DEPRECATED: Use <a class="el" href="pkcs5_8h.html#a27acee27c97ca3b9ee3dfb9b88d52a0f" title="Checkup routine. ">pkcs5_self_test()</a> instead! <a href="#ae9cd595f1c6bca6c92a2ab7f05773c05">More...</a><br/></td></tr> <tr class="separator:ae9cd595f1c6bca6c92a2ab7f05773c05"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Password-Based Key Derivation Function 2 (from PKCS#5) DEPRECATED: use <a class="el" href="pkcs5_8h.html" title="PKCS#5 functions. ">pkcs5.h</a> instead. </p> <dl class="section author"><dt>Author</dt><dd>Mathias Olsson <a href="#" onclick="location.href='mai'+'lto:'+'mat'+'hi'+'as@'+'ko'+'mpe'+'te'+'nsu'+'m.'+'com'; return false;">mathi<span style="display: none;">.nosp@m.</span>as@k<span style="display: none;">.nosp@m.</span>ompet<span style="display: none;">.nosp@m.</span>ensu<span style="display: none;">.nosp@m.</span>m.com</a></dd></dl> <p>Copyright (C) 2006-2012, Brainspark B.V.</p> <p>This file is part of PolarSSL (<a href="http://www.polarssl.org">http://www.polarssl.org</a>) Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org></p> <p>All rights reserved.</p> <p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p> <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p> <p>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. </p> <p>Definition in file <a class="el" href="pbkdf2_8h_source.html">pbkdf2.h</a>.</p> </div><h2 class="groupheader">Macro Definition Documentation</h2> <a class="anchor" id="a32afaed6ae1467f54e0ca0d2550329f9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA   -0x007C</td> </tr> </table> </div><div class="memdoc"> <p>Bad input parameters to function. </p> <p>Definition at line <a class="el" href="pbkdf2_8h_source.html#l00044">44</a> of file <a class="el" href="pbkdf2_8h_source.html">pbkdf2.h</a>.</p> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="ad6db50404ba78149d24a051c51365f57"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int pbkdf2_hmac </td> <td>(</td> <td class="paramtype"><a class="el" href="structmd__context__t.html">md_context_t</a> * </td> <td class="paramname"><em>ctx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const unsigned char * </td> <td class="paramname"><em>password</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>plen</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const unsigned char * </td> <td class="paramname"><em>salt</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>slen</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>iteration_count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"><em>key_length</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned char * </td> <td class="paramname"><em>output</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>PKCS#5 PBKDF2 using HMAC DEPRECATED: Use <a class="el" href="pkcs5_8h.html#acbff7ba1c4b49a208efcf8d6f4060153" title="PKCS#5 PBKDF2 using HMAC. ">pkcs5_pbkdf2_hmac()</a> instead! </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ctx</td><td>Generic HMAC context </td></tr> <tr><td class="paramname">password</td><td>Password to use when generating key </td></tr> <tr><td class="paramname">plen</td><td>Length of password </td></tr> <tr><td class="paramname">salt</td><td>Salt to use when generating key </td></tr> <tr><td class="paramname">slen</td><td>Length of salt </td></tr> <tr><td class="paramname">iteration_count</td><td>Iteration count </td></tr> <tr><td class="paramname">key_length</td><td>Length of generated key </td></tr> <tr><td class="paramname">output</td><td>Generated key. Must be at least as big as key_length</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success, or a PolarSSL error code if verification fails. </dd></dl> </div> </div> <a class="anchor" id="ae9cd595f1c6bca6c92a2ab7f05773c05"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int pbkdf2_self_test </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>verbose</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Checkup routine DEPRECATED: Use <a class="el" href="pkcs5_8h.html#a27acee27c97ca3b9ee3dfb9b88d52a0f" title="Checkup routine. ">pkcs5_self_test()</a> instead! </p> <dl class="section return"><dt>Returns</dt><dd>0 if successful, or 1 if the test failed </dd></dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Jul 31 2014 11:35:56 for PolarSSL v1.3.8 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>