<!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.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>mbed TLS v2.7.8: mbedtls_cipher_context_t Struct 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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">mbed TLS v2.7.8 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search'); }); </script> <div id="main-nav"></div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <div class="title">mbedtls_cipher_context_t Struct Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include <<a class="el" href="cipher_8h_source.html">cipher.h</a>></code></p> <div class="dynheader"> Collaboration diagram for mbedtls_cipher_context_t:</div> <div class="dyncontent"> <div class="center"><img src="structmbedtls__cipher__context__t__coll__graph.png" border="0" usemap="#mbedtls__cipher__context__t_coll__map" alt="Collaboration graph"/></div> <map name="mbedtls__cipher__context__t_coll__map" id="mbedtls__cipher__context__t_coll__map"> <area shape="rect" id="node2" href="structmbedtls__cipher__info__t.html" title="mbedtls_cipher_info_t" alt="" coords="21,5,253,32"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr class="memitem:a7673da39ff63a88c9b85769048884dae"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a7673da39ff63a88c9b85769048884dae">cipher_info</a></td></tr> <tr class="separator:a7673da39ff63a88c9b85769048884dae"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac949d799444e6379acf0125891c04763"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#ac949d799444e6379acf0125891c04763">key_bitlen</a></td></tr> <tr class="separator:ac949d799444e6379acf0125891c04763"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0075f60f220daa87578223a2022ba405"><td class="memItemLeft" align="right" valign="top"><a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a0075f60f220daa87578223a2022ba405">operation</a></td></tr> <tr class="separator:a0075f60f220daa87578223a2022ba405"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1c9ca536bde6b0da3bd3c57a50c1ea8f"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a1c9ca536bde6b0da3bd3c57a50c1ea8f">add_padding</a> )(unsigned char *output, size_t olen, size_t data_len)</td></tr> <tr class="separator:a1c9ca536bde6b0da3bd3c57a50c1ea8f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a60c17ef8d5ea5490d5927ae95262a967"><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a60c17ef8d5ea5490d5927ae95262a967">get_padding</a> )(unsigned char *input, size_t ilen, size_t *data_len)</td></tr> <tr class="separator:a60c17ef8d5ea5490d5927ae95262a967"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3fc86dfa20e0131377692ee07fb5b8f0"><td class="memItemLeft" align="right" valign="top">unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a3fc86dfa20e0131377692ee07fb5b8f0">unprocessed_data</a> [<a class="el" href="cipher_8h.html#ab8f30dc90403204515f868c3b6196ffd">MBEDTLS_MAX_BLOCK_LENGTH</a>]</td></tr> <tr class="separator:a3fc86dfa20e0131377692ee07fb5b8f0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad9bb94ad0e914bdceb20190cfebfc702"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#ad9bb94ad0e914bdceb20190cfebfc702">unprocessed_len</a></td></tr> <tr class="separator:ad9bb94ad0e914bdceb20190cfebfc702"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a19262f2c275b31180e7412f4bcef0e7f"><td class="memItemLeft" align="right" valign="top">unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a19262f2c275b31180e7412f4bcef0e7f">iv</a> [<a class="el" href="cipher_8h.html#aec294721b811aa0f7dcc940029fd8aab">MBEDTLS_MAX_IV_LENGTH</a>]</td></tr> <tr class="separator:a19262f2c275b31180e7412f4bcef0e7f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af11d1d21da68ef00a46d96d9de326206"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#af11d1d21da68ef00a46d96d9de326206">iv_size</a></td></tr> <tr class="separator:af11d1d21da68ef00a46d96d9de326206"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5b7e2044b5186a4ee57456f6f927ad80"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html#a5b7e2044b5186a4ee57456f6f927ad80">cipher_ctx</a></td></tr> <tr class="separator:a5b7e2044b5186a4ee57456f6f927ad80"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Generic cipher context. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00245">245</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div><h2 class="groupheader">Field Documentation</h2> <a id="a1c9ca536bde6b0da3bd3c57a50c1ea8f"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1c9ca536bde6b0da3bd3c57a50c1ea8f">◆ </a></span>add_padding</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void(* mbedtls_cipher_context_t::add_padding) (unsigned char *output, size_t olen, size_t data_len)</td> </tr> </table> </div><div class="memdoc"> <p>Padding functions to use, if relevant for the specific cipher mode. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00261">261</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="a5b7e2044b5186a4ee57456f6f927ad80"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5b7e2044b5186a4ee57456f6f927ad80">◆ </a></span>cipher_ctx</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* mbedtls_cipher_context_t::cipher_ctx</td> </tr> </table> </div><div class="memdoc"> <p>The cipher-specific context. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00278">278</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="a7673da39ff63a88c9b85769048884dae"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7673da39ff63a88c9b85769048884dae">◆ </a></span>cipher_info</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a>* mbedtls_cipher_context_t::cipher_info</td> </tr> </table> </div><div class="memdoc"> <p>Information about the associated cipher. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00247">247</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> <p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00374">mbedtls_cipher_get_block_size()</a>, <a class="el" href="cipher_8h_source.html#l00391">mbedtls_cipher_get_cipher_mode()</a>, <a class="el" href="cipher_8h_source.html#l00409">mbedtls_cipher_get_iv_size()</a>, <a class="el" href="cipher_8h_source.html#l00462">mbedtls_cipher_get_key_bitlen()</a>, <a class="el" href="cipher_8h_source.html#l00445">mbedtls_cipher_get_name()</a>, <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>, and <a class="el" href="cipher_8h_source.html#l00428">mbedtls_cipher_get_type()</a>.</p> </div> </div> <a id="a60c17ef8d5ea5490d5927ae95262a967"></a> <h2 class="memtitle"><span class="permalink"><a href="#a60c17ef8d5ea5490d5927ae95262a967">◆ </a></span>get_padding</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int(* mbedtls_cipher_context_t::get_padding) (unsigned char *input, size_t ilen, size_t *data_len)</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00262">262</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="a19262f2c275b31180e7412f4bcef0e7f"></a> <h2 class="memtitle"><span class="permalink"><a href="#a19262f2c275b31180e7412f4bcef0e7f">◆ </a></span>iv</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned char mbedtls_cipher_context_t::iv[<a class="el" href="cipher_8h.html#aec294721b811aa0f7dcc940029fd8aab">MBEDTLS_MAX_IV_LENGTH</a>]</td> </tr> </table> </div><div class="memdoc"> <p>Current IV or NONCE_COUNTER for CTR-mode. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00272">272</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="af11d1d21da68ef00a46d96d9de326206"></a> <h2 class="memtitle"><span class="permalink"><a href="#af11d1d21da68ef00a46d96d9de326206">◆ </a></span>iv_size</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t mbedtls_cipher_context_t::iv_size</td> </tr> </table> </div><div class="memdoc"> <p>IV size in Bytes, for ciphers with variable-length IVs. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00275">275</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> <p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00409">mbedtls_cipher_get_iv_size()</a>.</p> </div> </div> <a id="ac949d799444e6379acf0125891c04763"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac949d799444e6379acf0125891c04763">◆ </a></span>key_bitlen</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int mbedtls_cipher_context_t::key_bitlen</td> </tr> </table> </div><div class="memdoc"> <p>Key length to use. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00250">250</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="a0075f60f220daa87578223a2022ba405"></a> <h2 class="memtitle"><span class="permalink"><a href="#a0075f60f220daa87578223a2022ba405">◆ </a></span>operation</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a> mbedtls_cipher_context_t::operation</td> </tr> </table> </div><div class="memdoc"> <p>Operation that the key of the context has been initialized for. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00255">255</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> <p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p> </div> </div> <a id="a3fc86dfa20e0131377692ee07fb5b8f0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3fc86dfa20e0131377692ee07fb5b8f0">◆ </a></span>unprocessed_data</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned char mbedtls_cipher_context_t::unprocessed_data[<a class="el" href="cipher_8h.html#ab8f30dc90403204515f868c3b6196ffd">MBEDTLS_MAX_BLOCK_LENGTH</a>]</td> </tr> </table> </div><div class="memdoc"> <p>Buffer for input that has not been processed yet. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00266">266</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <a id="ad9bb94ad0e914bdceb20190cfebfc702"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad9bb94ad0e914bdceb20190cfebfc702">◆ </a></span>unprocessed_len</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t mbedtls_cipher_context_t::unprocessed_len</td> </tr> </table> </div><div class="memdoc"> <p>Number of Bytes that have not been processed yet. </p> <p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00269">269</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li><a class="el" href="cipher_8h_source.html">cipher.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Jan 1 2019 18:27:18 for mbed TLS v2.7.8 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>