Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > f835bee5b8b7ec08e20fae17cab51e63 > files > 140

lib64mbedtls-devel-2.7.3-1.mga6.x86_64.rpm

<!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.3: cipher.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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">mbed TLS v2.7.3
   </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 id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_b4d146e9a6d8dd56ed4afb2480a97fd3.html">mbedtls</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">cipher.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The generic cipher wrapper.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="config_8h_source.html">config.h</a>&quot;</code><br />
<code>#include &lt;stddef.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for cipher.h:</div>
<div class="dyncontent">
<div class="center"><img src="cipher_8h__incl.png" border="0" usemap="#cipher_8h" alt=""/></div>
<map name="cipher_8h" id="cipher_8h">
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="cipher_8h__dep__incl.png" border="0" usemap="#cipher_8hdep" alt=""/></div>
<map name="cipher_8hdep" id="cipher_8hdep">
</map>
</div>
</div>
<p><a href="cipher_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="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aedd176bb71b4e03034f0d629a1c8be40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aedd176bb71b4e03034f0d629a1c8be40">MBEDTLS_CIPHER_MODE_AEAD</a></td></tr>
<tr class="separator:aedd176bb71b4e03034f0d629a1c8be40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8858b88a22fbd142804f2ab411f8c24c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a8858b88a22fbd142804f2ab411f8c24c">MBEDTLS_CIPHER_MODE_WITH_PADDING</a></td></tr>
<tr class="separator:a8858b88a22fbd142804f2ab411f8c24c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcd10ede34f16d1c597dd76ef6abf9de"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#adcd10ede34f16d1c597dd76ef6abf9de">MBEDTLS_CIPHER_MODE_STREAM</a></td></tr>
<tr class="separator:adcd10ede34f16d1c597dd76ef6abf9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5093ef5a2ca66691e189c4224098355e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a5093ef5a2ca66691e189c4224098355e">MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE</a>&#160;&#160;&#160;-0x6080</td></tr>
<tr class="separator:a5093ef5a2ca66691e189c4224098355e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ce4034c4ecd0cd1592232ed8a93d648"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a>&#160;&#160;&#160;-0x6100</td></tr>
<tr class="separator:a6ce4034c4ecd0cd1592232ed8a93d648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd30fe33f8b6cf8106e7ea29d3f795cd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#abd30fe33f8b6cf8106e7ea29d3f795cd">MBEDTLS_ERR_CIPHER_ALLOC_FAILED</a>&#160;&#160;&#160;-0x6180</td></tr>
<tr class="separator:abd30fe33f8b6cf8106e7ea29d3f795cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06295349279dcbda6b1317924d5bb810"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a06295349279dcbda6b1317924d5bb810">MBEDTLS_ERR_CIPHER_INVALID_PADDING</a>&#160;&#160;&#160;-0x6200</td></tr>
<tr class="separator:a06295349279dcbda6b1317924d5bb810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7da041aba839f2ba606eb30f7547b8b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#ac7da041aba839f2ba606eb30f7547b8b">MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED</a>&#160;&#160;&#160;-0x6280</td></tr>
<tr class="separator:ac7da041aba839f2ba606eb30f7547b8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67ec20c7b124cb258978a41d5c363def"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a67ec20c7b124cb258978a41d5c363def">MBEDTLS_ERR_CIPHER_AUTH_FAILED</a>&#160;&#160;&#160;-0x6300</td></tr>
<tr class="separator:a67ec20c7b124cb258978a41d5c363def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee9e36063fbb6890aeb9918db7fa020e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aee9e36063fbb6890aeb9918db7fa020e">MBEDTLS_ERR_CIPHER_INVALID_CONTEXT</a>&#160;&#160;&#160;-0x6380</td></tr>
<tr class="separator:aee9e36063fbb6890aeb9918db7fa020e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a433960cca791ec1eb38e2ff2b425d0ac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a433960cca791ec1eb38e2ff2b425d0ac">MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED</a>&#160;&#160;&#160;-0x6400</td></tr>
<tr class="separator:a433960cca791ec1eb38e2ff2b425d0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a6dc5188d4a1e9bc43d9ea7c8505c6c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a2a6dc5188d4a1e9bc43d9ea7c8505c6c">MBEDTLS_CIPHER_VARIABLE_IV_LEN</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:a2a6dc5188d4a1e9bc43d9ea7c8505c6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a882893bcfc917982037621f6e97968a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a882893bcfc917982037621f6e97968a6">MBEDTLS_CIPHER_VARIABLE_KEY_LEN</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:a882893bcfc917982037621f6e97968a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec294721b811aa0f7dcc940029fd8aab"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aec294721b811aa0f7dcc940029fd8aab">MBEDTLS_MAX_IV_LENGTH</a>&#160;&#160;&#160;16</td></tr>
<tr class="separator:aec294721b811aa0f7dcc940029fd8aab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8f30dc90403204515f868c3b6196ffd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#ab8f30dc90403204515f868c3b6196ffd">MBEDTLS_MAX_BLOCK_LENGTH</a>&#160;&#160;&#160;16</td></tr>
<tr class="separator:ab8f30dc90403204515f868c3b6196ffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aa8cada37dceeb13446c7c31459b31a07"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="cipher_8h.html#aa8cada37dceeb13446c7c31459b31a07">mbedtls_cipher_base_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aa8cada37dceeb13446c7c31459b31a07">mbedtls_cipher_base_t</a></td></tr>
<tr class="separator:aa8cada37dceeb13446c7c31459b31a07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadfdebf0a70882e059172aa1c7235c45"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structmbedtls__cmac__context__t.html">mbedtls_cmac_context_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aadfdebf0a70882e059172aa1c7235c45">mbedtls_cmac_context_t</a></td></tr>
<tr class="separator:aadfdebf0a70882e059172aa1c7235c45"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:af5b069ffd0b2ad31225e42ee4ee29b1b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1b">mbedtls_cipher_id_t</a> { <br />
&#160;&#160;<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba9e83a435f3ae051a51b3755d57fb7324">MBEDTLS_CIPHER_ID_NONE</a> = 0, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba3b9447c8b50e7e1b8a5d526360388a14">MBEDTLS_CIPHER_ID_NULL</a>, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba5a1de07b89c2fa03e102493c92a6d074">MBEDTLS_CIPHER_ID_AES</a>, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba34bf0303a00b450f0262e97323b67fd7">MBEDTLS_CIPHER_ID_DES</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba02827f5eb7b2600fba6ec40873b31a1b">MBEDTLS_CIPHER_ID_3DES</a>, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba1b9895858b351464e65bb47c5b11a011">MBEDTLS_CIPHER_ID_CAMELLIA</a>, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1bac9c5b79b2697c3597a14cd5ab8d0d274">MBEDTLS_CIPHER_ID_BLOWFISH</a>, 
<a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba3af920001f66e699056d9cba06f08b26">MBEDTLS_CIPHER_ID_ARC4</a>
<br />
 }<tr class="memdesc:af5b069ffd0b2ad31225e42ee4ee29b1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration of supported ciphers.  <a href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1b">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:af5b069ffd0b2ad31225e42ee4ee29b1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00c5885f1ea7279c5a7d8e12e596569d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a> { <br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da9551142e177841a57cf75cd357791fea">MBEDTLS_CIPHER_NONE</a> = 0, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569daab45ae42bc7ab1617877167471496710">MBEDTLS_CIPHER_NULL</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da02173aedfb459d27316f8fcbd8452e13">MBEDTLS_CIPHER_AES_128_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dac6e30c2e56a54e78a8b46e4d87839422">MBEDTLS_CIPHER_AES_192_ECB</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da3c1d1256bc0e6ed7b5f5cf4dff038432">MBEDTLS_CIPHER_AES_256_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da19501fb55aec2f10338baab059cc8ca8">MBEDTLS_CIPHER_AES_128_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da9c17540658505285896a55ef27bad52b">MBEDTLS_CIPHER_AES_192_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dab89e8f49d884804188cc9837066f4017">MBEDTLS_CIPHER_AES_256_CBC</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da57257cfaf7fe39e49c3a35145223de43">MBEDTLS_CIPHER_AES_128_CFB128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da665a71ade48243f64f191a5d2320bef8">MBEDTLS_CIPHER_AES_192_CFB128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da93d9e55a10f94176800ac1155a89e2b4">MBEDTLS_CIPHER_AES_256_CFB128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da5f1f64e7a813ebe35de67d10f04c7c12">MBEDTLS_CIPHER_AES_128_CTR</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569daa6da8177c2e59f582cf53c0ab91b0d23">MBEDTLS_CIPHER_AES_192_CTR</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da41d9d9a010b9009bff05b3cfc3452655">MBEDTLS_CIPHER_AES_256_CTR</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da90a73f2b2d039360cda2c4655dbedd22">MBEDTLS_CIPHER_AES_128_GCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da1d6fd8cd15664a20d1c8426802b8c54b">MBEDTLS_CIPHER_AES_192_GCM</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da73308f133a09589299d2f4d7e94ae538">MBEDTLS_CIPHER_AES_256_GCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da9b5b21833004061678fc7e7eb28d3821">MBEDTLS_CIPHER_CAMELLIA_128_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da90b5be24e59a7dfdfbf9a125cce0f083">MBEDTLS_CIPHER_CAMELLIA_192_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da8a1d31bd95a7d518611e393775d47df7">MBEDTLS_CIPHER_CAMELLIA_256_ECB</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da7be9d1d8f2ca3bbd6e5c8fa9afc1c58e">MBEDTLS_CIPHER_CAMELLIA_128_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da26365f403c2b046ce35774e3cbaf72aa">MBEDTLS_CIPHER_CAMELLIA_192_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dae5706408ed6a0cdce83240ecb0d093b1">MBEDTLS_CIPHER_CAMELLIA_256_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da77f1b0e09890fb93e93f4968980d5ba8">MBEDTLS_CIPHER_CAMELLIA_128_CFB128</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da5a02c88a1d48fa0d901e9aa22f477be5">MBEDTLS_CIPHER_CAMELLIA_192_CFB128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da7d99ecf5a8719950a8be99fb9927e3b2">MBEDTLS_CIPHER_CAMELLIA_256_CFB128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dab28c28e9f5c0ccf4f5aabdd457131e6f">MBEDTLS_CIPHER_CAMELLIA_128_CTR</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dabaa17a8b74d8334500e86bf8ec5d47d4">MBEDTLS_CIPHER_CAMELLIA_192_CTR</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dadb9f15b9c71b37a83c68092390133f03">MBEDTLS_CIPHER_CAMELLIA_256_CTR</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da0653c936c1f48311640b3f796d3096d8">MBEDTLS_CIPHER_CAMELLIA_128_GCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da31bcc4ad8b983507288b98379a855584">MBEDTLS_CIPHER_CAMELLIA_192_GCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da2005aa6b74cb2574de6f4b104b1a6278">MBEDTLS_CIPHER_CAMELLIA_256_GCM</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da0ed7c295258192976c4f11be930b6383">MBEDTLS_CIPHER_DES_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da75ebf8afe088218555df2211b06ed24a">MBEDTLS_CIPHER_DES_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da22c639d17383ce7a7897e6364a51dbeb">MBEDTLS_CIPHER_DES_EDE_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569daa85f7610f000ed8680164bb650278aa3">MBEDTLS_CIPHER_DES_EDE_CBC</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dad749b54fa7af5af9754f600a1cf6e8f0">MBEDTLS_CIPHER_DES_EDE3_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da0ebeb46e514f7d7c9791daf9f31bdbc2">MBEDTLS_CIPHER_DES_EDE3_CBC</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dab3d8f893f571c92eb58502736b4c6bb5">MBEDTLS_CIPHER_BLOWFISH_ECB</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da87523896b1400ae2d087933e16747bde">MBEDTLS_CIPHER_BLOWFISH_CBC</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da22f9343e99edc3585e83d62f9a51f9e2">MBEDTLS_CIPHER_BLOWFISH_CFB64</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da1d97e5626452997faea9ac47132d5ee2">MBEDTLS_CIPHER_BLOWFISH_CTR</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569dab9aeb9f4c1082c404e262eff5c16046f">MBEDTLS_CIPHER_ARC4_128</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569daa853efb100255649d70037a69a6cc5f1">MBEDTLS_CIPHER_AES_128_CCM</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da4dafc03176b3e587f5e50867ac1be0f6">MBEDTLS_CIPHER_AES_192_CCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da7d1a7208c43a711c1665241402b8390d">MBEDTLS_CIPHER_AES_256_CCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da5ad79b02517bb3b319280330456d049f">MBEDTLS_CIPHER_CAMELLIA_128_CCM</a>, 
<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da9c6e4c22ec84211b82860074889d5804">MBEDTLS_CIPHER_CAMELLIA_192_CCM</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da72a8f49efb32a40d6fef16aef04622c0">MBEDTLS_CIPHER_CAMELLIA_256_CCM</a>
<br />
 }<tr class="memdesc:a00c5885f1ea7279c5a7d8e12e596569d"><td class="mdescLeft">&#160;</td><td class="mdescRight">An enumeration of supported (cipher, mode) pairs.  <a href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a00c5885f1ea7279c5a7d8e12e596569d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf5f7524a682fa63093dd0fa608fb2f8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a> { <br />
&#160;&#160;<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a4a44bef531861d3e54416b95607e7ebe">MBEDTLS_MODE_NONE</a> = 0, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a002ae72c0dbf793b5858971b7ce315b1">MBEDTLS_MODE_ECB</a>, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8ac89f6880c66f742e913bf4f7618a797b">MBEDTLS_MODE_CBC</a>, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a533e18634ddf1d7808c02531d2d0a891">MBEDTLS_MODE_CFB</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8acb22e5e78f1673f4273d0e179994f863">MBEDTLS_MODE_OFB</a>, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a95ecb03d135fd973e6da0b7e57db804e">MBEDTLS_MODE_CTR</a>, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a9683c4bedc462171adaf652b875abf09">MBEDTLS_MODE_GCM</a>, 
<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a2c808617b79a98d48ee7e62d97c425ef">MBEDTLS_MODE_STREAM</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a0a5ca88e2e3530c0aef4861dfb6eda2b">MBEDTLS_MODE_CCM</a>
<br />
 }</td></tr>
<tr class="separator:adf5f7524a682fa63093dd0fa608fb2f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b57bc07ab7c430e9b4f29f3a5729837"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837">mbedtls_cipher_padding_t</a> { <br />
&#160;&#160;<a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837a787071478fb192f36d4a085e010b28f9">MBEDTLS_PADDING_PKCS7</a> = 0, 
<a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837a502732ab53a21eb0bf84e5a8e93609a7">MBEDTLS_PADDING_ONE_AND_ZEROS</a>, 
<a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837a93944bd7edfd0c6b6f362eb6eef1b4fc">MBEDTLS_PADDING_ZEROS_AND_LEN</a>, 
<a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837a339efb60a69e4b033a106c61cd8691e4">MBEDTLS_PADDING_ZEROS</a>, 
<br />
&#160;&#160;<a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837aace08abe82f9f79e57387133ceb07394">MBEDTLS_PADDING_NONE</a>
<br />
 }</td></tr>
<tr class="separator:a5b57bc07ab7c430e9b4f29f3a5729837"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa5f820a58011f938ba3389555ba5b3f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a> { <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fa3e5a23a347d62ec3075f547516b0e2b3">MBEDTLS_OPERATION_NONE</a> = -1, 
<a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fa1209c6e6314e7dfa517602d53b6ea8b6">MBEDTLS_DECRYPT</a> = 0, 
<a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fab6bd8754064eab0b5fe2426184542ba6">MBEDTLS_ENCRYPT</a>
 }</td></tr>
<tr class="separator:aaa5f820a58011f938ba3389555ba5b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="cipher_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba27a227b285707a038e87cee36a8d1a65">MBEDTLS_KEY_LENGTH_NONE</a> = 0, 
<a class="el" href="cipher_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba0786b4375829efe98db9d73c5b12eda1">MBEDTLS_KEY_LENGTH_DES</a> = 64, 
<a class="el" href="cipher_8h.html#a06fc87d81c62e9abb8790b6e5713c55bade90f9d4c430f18b705faac59b2ed0b9">MBEDTLS_KEY_LENGTH_DES_EDE</a> = 128, 
<a class="el" href="cipher_8h.html#a06fc87d81c62e9abb8790b6e5713c55bae5eb36c0a8ae45bec5b0070292be6c17">MBEDTLS_KEY_LENGTH_DES_EDE3</a> = 192
 }</td></tr>
<tr class="separator:a06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</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:a763ea39a9ccfc20f914fd3391d12a7fc"><td class="memItemLeft" align="right" valign="top">const int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a763ea39a9ccfc20f914fd3391d12a7fc">mbedtls_cipher_list</a> (void)</td></tr>
<tr class="memdesc:a763ea39a9ccfc20f914fd3391d12a7fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function retrieves the list of ciphers supported by the generic cipher module.  <a href="#a763ea39a9ccfc20f914fd3391d12a7fc">More...</a><br /></td></tr>
<tr class="separator:a763ea39a9ccfc20f914fd3391d12a7fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b2e7d49ca82abe8c96b65645364e24b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a9b2e7d49ca82abe8c96b65645364e24b">mbedtls_cipher_info_from_string</a> (const char *cipher_name)</td></tr>
<tr class="memdesc:a9b2e7d49ca82abe8c96b65645364e24b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function retrieves the cipher-information structure associated with the given cipher name.  <a href="#a9b2e7d49ca82abe8c96b65645364e24b">More...</a><br /></td></tr>
<tr class="separator:a9b2e7d49ca82abe8c96b65645364e24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bc2809cbd7c2357f41be8cf76eeed92"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a8bc2809cbd7c2357f41be8cf76eeed92">mbedtls_cipher_info_from_type</a> (const <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a> cipher_type)</td></tr>
<tr class="memdesc:a8bc2809cbd7c2357f41be8cf76eeed92"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function retrieves the cipher-information structure associated with the given cipher type.  <a href="#a8bc2809cbd7c2357f41be8cf76eeed92">More...</a><br /></td></tr>
<tr class="separator:a8bc2809cbd7c2357f41be8cf76eeed92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9752d8056c43948c08d2e1f2009a53aa"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a9752d8056c43948c08d2e1f2009a53aa">mbedtls_cipher_info_from_values</a> (const <a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1b">mbedtls_cipher_id_t</a> cipher_id, int key_bitlen, const <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a> mode)</td></tr>
<tr class="memdesc:a9752d8056c43948c08d2e1f2009a53aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function retrieves the cipher-information structure associated with the given cipher ID, key size and mode.  <a href="#a9752d8056c43948c08d2e1f2009a53aa">More...</a><br /></td></tr>
<tr class="separator:a9752d8056c43948c08d2e1f2009a53aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80354364e91cdb4d4e6ab7ecec65fe07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a80354364e91cdb4d4e6ab7ecec65fe07">mbedtls_cipher_init</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a80354364e91cdb4d4e6ab7ecec65fe07"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes a <code>cipher_context</code> as NONE.  <a href="#a80354364e91cdb4d4e6ab7ecec65fe07">More...</a><br /></td></tr>
<tr class="separator:a80354364e91cdb4d4e6ab7ecec65fe07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a903c4146b471207690988584b83854a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a903c4146b471207690988584b83854a9">mbedtls_cipher_free</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a903c4146b471207690988584b83854a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function frees and clears the cipher-specific context of <code>ctx</code>. Freeing <code>ctx</code> itself remains the responsibility of the caller.  <a href="#a903c4146b471207690988584b83854a9">More...</a><br /></td></tr>
<tr class="separator:a903c4146b471207690988584b83854a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a009056b59d69abba5843ce78cd9aae1c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a009056b59d69abba5843ce78cd9aae1c">mbedtls_cipher_setup</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> *cipher_info)</td></tr>
<tr class="memdesc:a009056b59d69abba5843ce78cd9aae1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes and fills the cipher-context structure with the appropriate values. It also clears the structure.  <a href="#a009056b59d69abba5843ce78cd9aae1c">More...</a><br /></td></tr>
<tr class="separator:a009056b59d69abba5843ce78cd9aae1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa585ffa4ded213e5b3160de86e95ec4b"><td class="memItemLeft" align="right" valign="top">static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aa585ffa4ded213e5b3160de86e95ec4b">mbedtls_cipher_get_block_size</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:aa585ffa4ded213e5b3160de86e95ec4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the block size of the given cipher.  <a href="#aa585ffa4ded213e5b3160de86e95ec4b">More...</a><br /></td></tr>
<tr class="separator:aa585ffa4ded213e5b3160de86e95ec4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adae6a0d3f6f0d3e78abbf2f247a06b66"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#adae6a0d3f6f0d3e78abbf2f247a06b66">mbedtls_cipher_get_cipher_mode</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:adae6a0d3f6f0d3e78abbf2f247a06b66"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the mode of operation for the cipher. For example, MBEDTLS_MODE_CBC.  <a href="#adae6a0d3f6f0d3e78abbf2f247a06b66">More...</a><br /></td></tr>
<tr class="separator:adae6a0d3f6f0d3e78abbf2f247a06b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95179cd977261724298e9bca67a0fcc0"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a95179cd977261724298e9bca67a0fcc0">mbedtls_cipher_get_iv_size</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a95179cd977261724298e9bca67a0fcc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the size of the IV or nonce of the cipher, in Bytes.  <a href="#a95179cd977261724298e9bca67a0fcc0">More...</a><br /></td></tr>
<tr class="separator:a95179cd977261724298e9bca67a0fcc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa11f687dee08d37b0a9835497b6c94f2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#aa11f687dee08d37b0a9835497b6c94f2">mbedtls_cipher_get_type</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:aa11f687dee08d37b0a9835497b6c94f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the type of the given cipher.  <a href="#aa11f687dee08d37b0a9835497b6c94f2">More...</a><br /></td></tr>
<tr class="separator:aa11f687dee08d37b0a9835497b6c94f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf1d75d9cb96ed87ab580313f5d0eeda"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#abf1d75d9cb96ed87ab580313f5d0eeda">mbedtls_cipher_get_name</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:abf1d75d9cb96ed87ab580313f5d0eeda"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the name of the given cipher as a string.  <a href="#abf1d75d9cb96ed87ab580313f5d0eeda">More...</a><br /></td></tr>
<tr class="separator:abf1d75d9cb96ed87ab580313f5d0eeda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f6abbb7eadc970085c6ab41145e4812"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a6f6abbb7eadc970085c6ab41145e4812">mbedtls_cipher_get_key_bitlen</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a6f6abbb7eadc970085c6ab41145e4812"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the key length of the cipher.  <a href="#a6f6abbb7eadc970085c6ab41145e4812">More...</a><br /></td></tr>
<tr class="separator:a6f6abbb7eadc970085c6ab41145e4812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a9f67bc0f62ae159eecfbe33512e17d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a8a9f67bc0f62ae159eecfbe33512e17d">mbedtls_cipher_get_operation</a> (const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a8a9f67bc0f62ae159eecfbe33512e17d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the operation of the given cipher.  <a href="#a8a9f67bc0f62ae159eecfbe33512e17d">More...</a><br /></td></tr>
<tr class="separator:a8a9f67bc0f62ae159eecfbe33512e17d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027be8bf469069be17d82c4899b3df5f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a027be8bf469069be17d82c4899b3df5f">mbedtls_cipher_setkey</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *key, int key_bitlen, const <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a> operation)</td></tr>
<tr class="memdesc:a027be8bf469069be17d82c4899b3df5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the key to use with the given context.  <a href="#a027be8bf469069be17d82c4899b3df5f">More...</a><br /></td></tr>
<tr class="separator:a027be8bf469069be17d82c4899b3df5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afad97d1964a7a98d82488fecd052130f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#afad97d1964a7a98d82488fecd052130f">mbedtls_cipher_set_padding_mode</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, <a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837">mbedtls_cipher_padding_t</a> mode)</td></tr>
<tr class="memdesc:afad97d1964a7a98d82488fecd052130f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the padding mode, for cipher modes that use padding.  <a href="#afad97d1964a7a98d82488fecd052130f">More...</a><br /></td></tr>
<tr class="separator:afad97d1964a7a98d82488fecd052130f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a570ef5913117fbb2592f75d0d834b51c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a570ef5913117fbb2592f75d0d834b51c">mbedtls_cipher_set_iv</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *iv, size_t iv_len)</td></tr>
<tr class="memdesc:a570ef5913117fbb2592f75d0d834b51c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets the initialization vector (IV) or nonce.  <a href="#a570ef5913117fbb2592f75d0d834b51c">More...</a><br /></td></tr>
<tr class="separator:a570ef5913117fbb2592f75d0d834b51c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22b60318022c1947d9893721bc911335"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a22b60318022c1947d9893721bc911335">mbedtls_cipher_reset</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx)</td></tr>
<tr class="memdesc:a22b60318022c1947d9893721bc911335"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function resets the cipher state.  <a href="#a22b60318022c1947d9893721bc911335">More...</a><br /></td></tr>
<tr class="separator:a22b60318022c1947d9893721bc911335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86bc4ed42ff087c33bb00fe31b049ae7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a86bc4ed42ff087c33bb00fe31b049ae7">mbedtls_cipher_update_ad</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *ad, size_t ad_len)</td></tr>
<tr class="memdesc:a86bc4ed42ff087c33bb00fe31b049ae7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function adds additional data for AEAD ciphers. Only supported with GCM. Must be called exactly once, after <a class="el" href="cipher_8h.html#a22b60318022c1947d9893721bc911335" title="This function resets the cipher state. ">mbedtls_cipher_reset()</a>.  <a href="#a86bc4ed42ff087c33bb00fe31b049ae7">More...</a><br /></td></tr>
<tr class="separator:a86bc4ed42ff087c33bb00fe31b049ae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a959598dfef9d7f2add8861e0c518f303"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a959598dfef9d7f2add8861e0c518f303">mbedtls_cipher_update</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen)</td></tr>
<tr class="memdesc:a959598dfef9d7f2add8861e0c518f303"><td class="mdescLeft">&#160;</td><td class="mdescRight">The generic cipher update function. It encrypts or decrypts using the given cipher context. Writes as many block-sized blocks of data as possible to output. Any data that cannot be written immediately is either added to the next block, or flushed when <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a> is called. Exception: For MBEDTLS_MODE_ECB, expects a single block in size. For example, 16 Bytes for AES.  <a href="#a959598dfef9d7f2add8861e0c518f303">More...</a><br /></td></tr>
<tr class="separator:a959598dfef9d7f2add8861e0c518f303"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6678691c02cb3f1322b2179987bfffb2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2">mbedtls_cipher_finish</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, unsigned char *output, size_t *olen)</td></tr>
<tr class="memdesc:a6678691c02cb3f1322b2179987bfffb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The generic cipher finalization function. If data still needs to be flushed from an incomplete block, the data contained in it is padded to the size of the last block, and written to the <code>output</code> buffer.  <a href="#a6678691c02cb3f1322b2179987bfffb2">More...</a><br /></td></tr>
<tr class="separator:a6678691c02cb3f1322b2179987bfffb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8916ddd18e94002913b80a6b04b83693"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a8916ddd18e94002913b80a6b04b83693">mbedtls_cipher_write_tag</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, unsigned char *tag, size_t tag_len)</td></tr>
<tr class="memdesc:a8916ddd18e94002913b80a6b04b83693"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function writes a tag for AEAD ciphers. Only supported with GCM. Must be called after <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a>.  <a href="#a8916ddd18e94002913b80a6b04b83693">More...</a><br /></td></tr>
<tr class="separator:a8916ddd18e94002913b80a6b04b83693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3388eaa42a44db6a0b0339dd49f15ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#ad3388eaa42a44db6a0b0339dd49f15ba">mbedtls_cipher_check_tag</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *tag, size_t tag_len)</td></tr>
<tr class="memdesc:ad3388eaa42a44db6a0b0339dd49f15ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks the tag for AEAD ciphers. Only supported with GCM. Must be called after <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a>.  <a href="#ad3388eaa42a44db6a0b0339dd49f15ba">More...</a><br /></td></tr>
<tr class="separator:ad3388eaa42a44db6a0b0339dd49f15ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c249f6ee1a0d2c906927c7790c41dc5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a1c249f6ee1a0d2c906927c7790c41dc5">mbedtls_cipher_crypt</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *iv, size_t iv_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen)</td></tr>
<tr class="memdesc:a1c249f6ee1a0d2c906927c7790c41dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The generic all-in-one encryption/decryption function, for all ciphers except AEAD constructs.  <a href="#a1c249f6ee1a0d2c906927c7790c41dc5">More...</a><br /></td></tr>
<tr class="separator:a1c249f6ee1a0d2c906927c7790c41dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65b2df023770ee3123a3f2cdb10497a0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a65b2df023770ee3123a3f2cdb10497a0">mbedtls_cipher_auth_encrypt</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *iv, size_t iv_len, const unsigned char *ad, size_t ad_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, unsigned char *tag, size_t tag_len)</td></tr>
<tr class="memdesc:a65b2df023770ee3123a3f2cdb10497a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The generic autenticated encryption (AEAD) function.  <a href="#a65b2df023770ee3123a3f2cdb10497a0">More...</a><br /></td></tr>
<tr class="separator:a65b2df023770ee3123a3f2cdb10497a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a715666cc823dc180277890b00f8a7f5e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cipher_8h.html#a715666cc823dc180277890b00f8a7f5e">mbedtls_cipher_auth_decrypt</a> (<a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *ctx, const unsigned char *iv, size_t iv_len, const unsigned char *ad, size_t ad_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, const unsigned char *tag, size_t tag_len)</td></tr>
<tr class="memdesc:a715666cc823dc180277890b00f8a7f5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The generic autenticated decryption (AEAD) function.  <a href="#a715666cc823dc180277890b00f8a7f5e">More...</a><br /></td></tr>
<tr class="separator:a715666cc823dc180277890b00f8a7f5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The generic cipher wrapper. </p>
<dl class="section author"><dt>Author</dt><dd>Adriaan de Jong <a href="#" onclick="location.href='mai'+'lto:'+'dej'+'on'+'g@f'+'ox'+'-it'+'.c'+'om'; return false;">dejon<span style="display: none;">.nosp@m.</span>g@fo<span style="display: none;">.nosp@m.</span>x-it.<span style="display: none;">.nosp@m.</span>com</a> </dd></dl>

<p class="definition">Definition in file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aedd176bb71b4e03034f0d629a1c8be40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedd176bb71b4e03034f0d629a1c8be40">&#9670;&nbsp;</a></span>MBEDTLS_CIPHER_MODE_AEAD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_CIPHER_MODE_AEAD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00039">39</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="adcd10ede34f16d1c597dd76ef6abf9de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcd10ede34f16d1c597dd76ef6abf9de">&#9670;&nbsp;</a></span>MBEDTLS_CIPHER_MODE_STREAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_CIPHER_MODE_STREAM</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00047">47</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a8858b88a22fbd142804f2ab411f8c24c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8858b88a22fbd142804f2ab411f8c24c">&#9670;&nbsp;</a></span>MBEDTLS_CIPHER_MODE_WITH_PADDING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_CIPHER_MODE_WITH_PADDING</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00043">43</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a2a6dc5188d4a1e9bc43d9ea7c8505c6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a6dc5188d4a1e9bc43d9ea7c8505c6c">&#9670;&nbsp;</a></span>MBEDTLS_CIPHER_VARIABLE_IV_LEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_CIPHER_VARIABLE_IV_LEN&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cipher accepts IVs of variable length. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00064">64</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a882893bcfc917982037621f6e97968a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a882893bcfc917982037621f6e97968a6">&#9670;&nbsp;</a></span>MBEDTLS_CIPHER_VARIABLE_KEY_LEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cipher accepts keys of variable length. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00065">65</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="abd30fe33f8b6cf8106e7ea29d3f795cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd30fe33f8b6cf8106e7ea29d3f795cd">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_ALLOC_FAILED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_ALLOC_FAILED&#160;&#160;&#160;-0x6180</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Failed to allocate memory. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00057">57</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a67ec20c7b124cb258978a41d5c363def"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67ec20c7b124cb258978a41d5c363def">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_AUTH_FAILED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_AUTH_FAILED&#160;&#160;&#160;-0x6300</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Authentication failed (for AEAD modes). </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00060">60</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a6ce4034c4ecd0cd1592232ed8a93d648"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ce4034c4ecd0cd1592232ed8a93d648">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA&#160;&#160;&#160;-0x6100</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bad input parameters. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00056">56</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a5093ef5a2ca66691e189c4224098355e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5093ef5a2ca66691e189c4224098355e">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE&#160;&#160;&#160;-0x6080</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The selected feature is not available. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00055">55</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="ac7da041aba839f2ba606eb30f7547b8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7da041aba839f2ba606eb30f7547b8b">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED&#160;&#160;&#160;-0x6280</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Decryption of block requires a full block. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00059">59</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a433960cca791ec1eb38e2ff2b425d0ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a433960cca791ec1eb38e2ff2b425d0ac">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED&#160;&#160;&#160;-0x6400</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cipher hardware accelerator failed. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00062">62</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="aee9e36063fbb6890aeb9918db7fa020e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee9e36063fbb6890aeb9918db7fa020e">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_INVALID_CONTEXT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_INVALID_CONTEXT&#160;&#160;&#160;-0x6380</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The context is invalid. For example, because it was freed. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00061">61</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a06295349279dcbda6b1317924d5bb810"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06295349279dcbda6b1317924d5bb810">&#9670;&nbsp;</a></span>MBEDTLS_ERR_CIPHER_INVALID_PADDING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_ERR_CIPHER_INVALID_PADDING&#160;&#160;&#160;-0x6200</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Input data contains invalid padding and is rejected. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00058">58</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="ab8f30dc90403204515f868c3b6196ffd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8f30dc90403204515f868c3b6196ffd">&#9670;&nbsp;</a></span>MBEDTLS_MAX_BLOCK_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_MAX_BLOCK_LENGTH&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum block size of any cipher, in Bytes. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00191">191</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="aec294721b811aa0f7dcc940029fd8aab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec294721b811aa0f7dcc940029fd8aab">&#9670;&nbsp;</a></span>MBEDTLS_MAX_IV_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBEDTLS_MAX_IV_LENGTH&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum length of any IV, in Bytes. </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00189">189</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aa8cada37dceeb13446c7c31459b31a07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8cada37dceeb13446c7c31459b31a07">&#9670;&nbsp;</a></span>mbedtls_cipher_base_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="cipher_8h.html#aa8cada37dceeb13446c7c31459b31a07">mbedtls_cipher_base_t</a> <a class="el" href="cipher_8h.html#aa8cada37dceeb13446c7c31459b31a07">mbedtls_cipher_base_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Base cipher information (opaque struct). </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00196">196</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="aadfdebf0a70882e059172aa1c7235c45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadfdebf0a70882e059172aa1c7235c45">&#9670;&nbsp;</a></span>mbedtls_cmac_context_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structmbedtls__cmac__context__t.html">mbedtls_cmac_context_t</a> <a class="el" href="structmbedtls__cmac__context__t.html">mbedtls_cmac_context_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>CMAC context (opaque struct). </p>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00201">201</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a06fc87d81c62e9abb8790b6e5713c55b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06fc87d81c62e9abb8790b6e5713c55b">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a06fc87d81c62e9abb8790b6e5713c55ba27a227b285707a038e87cee36a8d1a65"></a>MBEDTLS_KEY_LENGTH_NONE&#160;</td><td class="fielddoc"><p>Undefined key length. </p>
</td></tr>
<tr><td class="fieldname"><a id="a06fc87d81c62e9abb8790b6e5713c55ba0786b4375829efe98db9d73c5b12eda1"></a>MBEDTLS_KEY_LENGTH_DES&#160;</td><td class="fielddoc"><p>Key length, in bits (including parity), for DES keys. </p>
</td></tr>
<tr><td class="fieldname"><a id="a06fc87d81c62e9abb8790b6e5713c55bade90f9d4c430f18b705faac59b2ed0b9"></a>MBEDTLS_KEY_LENGTH_DES_EDE&#160;</td><td class="fielddoc"><p>Key length in bits, including parity, for DES in two-key EDE. </p>
</td></tr>
<tr><td class="fieldname"><a id="a06fc87d81c62e9abb8790b6e5713c55bae5eb36c0a8ae45bec5b0070292be6c17"></a>MBEDTLS_KEY_LENGTH_DES_EDE3&#160;</td><td class="fielddoc"><p>Key length in bits, including parity, for DES in three-key EDE. </p>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00177">177</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="af5b069ffd0b2ad31225e42ee4ee29b1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5b069ffd0b2ad31225e42ee4ee29b1b">&#9670;&nbsp;</a></span>mbedtls_cipher_id_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1b">mbedtls_cipher_id_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>An enumeration of supported ciphers. </p>
<dl class="section warning"><dt>Warning</dt><dd>ARC4 and DES are considered weak ciphers and their use constitutes a security risk. We recommend considering stronger ciphers instead. </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba9e83a435f3ae051a51b3755d57fb7324"></a>MBEDTLS_CIPHER_ID_NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba3b9447c8b50e7e1b8a5d526360388a14"></a>MBEDTLS_CIPHER_ID_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba5a1de07b89c2fa03e102493c92a6d074"></a>MBEDTLS_CIPHER_ID_AES&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba34bf0303a00b450f0262e97323b67fd7"></a>MBEDTLS_CIPHER_ID_DES&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba02827f5eb7b2600fba6ec40873b31a1b"></a>MBEDTLS_CIPHER_ID_3DES&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba1b9895858b351464e65bb47c5b11a011"></a>MBEDTLS_CIPHER_ID_CAMELLIA&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1bac9c5b79b2697c3597a14cd5ab8d0d274"></a>MBEDTLS_CIPHER_ID_BLOWFISH&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af5b069ffd0b2ad31225e42ee4ee29b1ba3af920001f66e699056d9cba06f08b26"></a>MBEDTLS_CIPHER_ID_ARC4&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00078">78</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="adf5f7524a682fa63093dd0fa608fb2f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf5f7524a682fa63093dd0fa608fb2f8">&#9670;&nbsp;</a></span>mbedtls_cipher_mode_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Supported cipher modes. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a4a44bef531861d3e54416b95607e7ebe"></a>MBEDTLS_MODE_NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a002ae72c0dbf793b5858971b7ce315b1"></a>MBEDTLS_MODE_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8ac89f6880c66f742e913bf4f7618a797b"></a>MBEDTLS_MODE_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a533e18634ddf1d7808c02531d2d0a891"></a>MBEDTLS_MODE_CFB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8acb22e5e78f1673f4273d0e179994f863"></a>MBEDTLS_MODE_OFB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a95ecb03d135fd973e6da0b7e57db804e"></a>MBEDTLS_MODE_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a9683c4bedc462171adaf652b875abf09"></a>MBEDTLS_MODE_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a2c808617b79a98d48ee7e62d97c425ef"></a>MBEDTLS_MODE_STREAM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adf5f7524a682fa63093dd0fa608fb2f8a0a5ca88e2e3530c0aef4861dfb6eda2b"></a>MBEDTLS_MODE_CCM&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00149">149</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a5b57bc07ab7c430e9b4f29f3a5729837"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b57bc07ab7c430e9b4f29f3a5729837">&#9670;&nbsp;</a></span>mbedtls_cipher_padding_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837">mbedtls_cipher_padding_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Supported cipher padding types. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5b57bc07ab7c430e9b4f29f3a5729837a787071478fb192f36d4a085e010b28f9"></a>MBEDTLS_PADDING_PKCS7&#160;</td><td class="fielddoc"><p>PKCS7 padding (default). </p>
</td></tr>
<tr><td class="fieldname"><a id="a5b57bc07ab7c430e9b4f29f3a5729837a502732ab53a21eb0bf84e5a8e93609a7"></a>MBEDTLS_PADDING_ONE_AND_ZEROS&#160;</td><td class="fielddoc"><p>ISO/IEC 7816-4 padding. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5b57bc07ab7c430e9b4f29f3a5729837a93944bd7edfd0c6b6f362eb6eef1b4fc"></a>MBEDTLS_PADDING_ZEROS_AND_LEN&#160;</td><td class="fielddoc"><p>ANSI X.923 padding. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5b57bc07ab7c430e9b4f29f3a5729837a339efb60a69e4b033a106c61cd8691e4"></a>MBEDTLS_PADDING_ZEROS&#160;</td><td class="fielddoc"><p>zero padding (not reversible). </p>
</td></tr>
<tr><td class="fieldname"><a id="a5b57bc07ab7c430e9b4f29f3a5729837aace08abe82f9f79e57387133ceb07394"></a>MBEDTLS_PADDING_NONE&#160;</td><td class="fielddoc"><p>never pad (full blocks only). </p>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00162">162</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="a00c5885f1ea7279c5a7d8e12e596569d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00c5885f1ea7279c5a7d8e12e596569d">&#9670;&nbsp;</a></span>mbedtls_cipher_type_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>An enumeration of supported (cipher, mode) pairs. </p>
<dl class="section warning"><dt>Warning</dt><dd>ARC4 and DES are considered weak ciphers and their use constitutes a security risk. We recommend considering stronger ciphers instead. </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da9551142e177841a57cf75cd357791fea"></a>MBEDTLS_CIPHER_NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569daab45ae42bc7ab1617877167471496710"></a>MBEDTLS_CIPHER_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da02173aedfb459d27316f8fcbd8452e13"></a>MBEDTLS_CIPHER_AES_128_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dac6e30c2e56a54e78a8b46e4d87839422"></a>MBEDTLS_CIPHER_AES_192_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da3c1d1256bc0e6ed7b5f5cf4dff038432"></a>MBEDTLS_CIPHER_AES_256_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da19501fb55aec2f10338baab059cc8ca8"></a>MBEDTLS_CIPHER_AES_128_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da9c17540658505285896a55ef27bad52b"></a>MBEDTLS_CIPHER_AES_192_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dab89e8f49d884804188cc9837066f4017"></a>MBEDTLS_CIPHER_AES_256_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da57257cfaf7fe39e49c3a35145223de43"></a>MBEDTLS_CIPHER_AES_128_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da665a71ade48243f64f191a5d2320bef8"></a>MBEDTLS_CIPHER_AES_192_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da93d9e55a10f94176800ac1155a89e2b4"></a>MBEDTLS_CIPHER_AES_256_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da5f1f64e7a813ebe35de67d10f04c7c12"></a>MBEDTLS_CIPHER_AES_128_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569daa6da8177c2e59f582cf53c0ab91b0d23"></a>MBEDTLS_CIPHER_AES_192_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da41d9d9a010b9009bff05b3cfc3452655"></a>MBEDTLS_CIPHER_AES_256_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da90a73f2b2d039360cda2c4655dbedd22"></a>MBEDTLS_CIPHER_AES_128_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da1d6fd8cd15664a20d1c8426802b8c54b"></a>MBEDTLS_CIPHER_AES_192_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da73308f133a09589299d2f4d7e94ae538"></a>MBEDTLS_CIPHER_AES_256_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da9b5b21833004061678fc7e7eb28d3821"></a>MBEDTLS_CIPHER_CAMELLIA_128_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da90b5be24e59a7dfdfbf9a125cce0f083"></a>MBEDTLS_CIPHER_CAMELLIA_192_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da8a1d31bd95a7d518611e393775d47df7"></a>MBEDTLS_CIPHER_CAMELLIA_256_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da7be9d1d8f2ca3bbd6e5c8fa9afc1c58e"></a>MBEDTLS_CIPHER_CAMELLIA_128_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da26365f403c2b046ce35774e3cbaf72aa"></a>MBEDTLS_CIPHER_CAMELLIA_192_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dae5706408ed6a0cdce83240ecb0d093b1"></a>MBEDTLS_CIPHER_CAMELLIA_256_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da77f1b0e09890fb93e93f4968980d5ba8"></a>MBEDTLS_CIPHER_CAMELLIA_128_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da5a02c88a1d48fa0d901e9aa22f477be5"></a>MBEDTLS_CIPHER_CAMELLIA_192_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da7d99ecf5a8719950a8be99fb9927e3b2"></a>MBEDTLS_CIPHER_CAMELLIA_256_CFB128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dab28c28e9f5c0ccf4f5aabdd457131e6f"></a>MBEDTLS_CIPHER_CAMELLIA_128_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dabaa17a8b74d8334500e86bf8ec5d47d4"></a>MBEDTLS_CIPHER_CAMELLIA_192_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dadb9f15b9c71b37a83c68092390133f03"></a>MBEDTLS_CIPHER_CAMELLIA_256_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da0653c936c1f48311640b3f796d3096d8"></a>MBEDTLS_CIPHER_CAMELLIA_128_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da31bcc4ad8b983507288b98379a855584"></a>MBEDTLS_CIPHER_CAMELLIA_192_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da2005aa6b74cb2574de6f4b104b1a6278"></a>MBEDTLS_CIPHER_CAMELLIA_256_GCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da0ed7c295258192976c4f11be930b6383"></a>MBEDTLS_CIPHER_DES_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da75ebf8afe088218555df2211b06ed24a"></a>MBEDTLS_CIPHER_DES_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da22c639d17383ce7a7897e6364a51dbeb"></a>MBEDTLS_CIPHER_DES_EDE_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569daa85f7610f000ed8680164bb650278aa3"></a>MBEDTLS_CIPHER_DES_EDE_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dad749b54fa7af5af9754f600a1cf6e8f0"></a>MBEDTLS_CIPHER_DES_EDE3_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da0ebeb46e514f7d7c9791daf9f31bdbc2"></a>MBEDTLS_CIPHER_DES_EDE3_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dab3d8f893f571c92eb58502736b4c6bb5"></a>MBEDTLS_CIPHER_BLOWFISH_ECB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da87523896b1400ae2d087933e16747bde"></a>MBEDTLS_CIPHER_BLOWFISH_CBC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da22f9343e99edc3585e83d62f9a51f9e2"></a>MBEDTLS_CIPHER_BLOWFISH_CFB64&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da1d97e5626452997faea9ac47132d5ee2"></a>MBEDTLS_CIPHER_BLOWFISH_CTR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569dab9aeb9f4c1082c404e262eff5c16046f"></a>MBEDTLS_CIPHER_ARC4_128&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569daa853efb100255649d70037a69a6cc5f1"></a>MBEDTLS_CIPHER_AES_128_CCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da4dafc03176b3e587f5e50867ac1be0f6"></a>MBEDTLS_CIPHER_AES_192_CCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da7d1a7208c43a711c1665241402b8390d"></a>MBEDTLS_CIPHER_AES_256_CCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da5ad79b02517bb3b319280330456d049f"></a>MBEDTLS_CIPHER_CAMELLIA_128_CCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da9c6e4c22ec84211b82860074889d5804"></a>MBEDTLS_CIPHER_CAMELLIA_192_CCM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a00c5885f1ea7279c5a7d8e12e596569da72a8f49efb32a40d6fef16aef04622c0"></a>MBEDTLS_CIPHER_CAMELLIA_256_CCM&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00096">96</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<a id="aaa5f820a58011f938ba3389555ba5b3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa5f820a58011f938ba3389555ba5b3f">&#9670;&nbsp;</a></span>mbedtls_operation_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type of operation. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aaa5f820a58011f938ba3389555ba5b3fa3e5a23a347d62ec3075f547516b0e2b3"></a>MBEDTLS_OPERATION_NONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="aaa5f820a58011f938ba3389555ba5b3fa1209c6e6314e7dfa517602d53b6ea8b6"></a>MBEDTLS_DECRYPT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="aaa5f820a58011f938ba3389555ba5b3fab6bd8754064eab0b5fe2426184542ba6"></a>MBEDTLS_ENCRYPT&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00171">171</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a715666cc823dc180277890b00f8a7f5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a715666cc823dc180277890b00f8a7f5e">&#9670;&nbsp;</a></span>mbedtls_cipher_auth_decrypt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_auth_decrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>iv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>iv_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>ad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ad_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ilen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>olen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>tag_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The generic autenticated decryption (AEAD) function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">iv</td><td>The IV to use, or NONCE_COUNTER for CTR-mode ciphers. </td></tr>
    <tr><td class="paramname">iv_len</td><td>The IV length for ciphers with variable-size IV. This parameter is discarded by ciphers with fixed-size IV. </td></tr>
    <tr><td class="paramname">ad</td><td>The additional data to be authenticated. </td></tr>
    <tr><td class="paramname">ad_len</td><td>The length of <code>ad</code>. </td></tr>
    <tr><td class="paramname">input</td><td>The buffer holding the input data. </td></tr>
    <tr><td class="paramname">ilen</td><td>The length of the input data. </td></tr>
    <tr><td class="paramname">output</td><td>The buffer for the output data. Must be able to hold at least <code>ilen</code>. </td></tr>
    <tr><td class="paramname">olen</td><td>The length of the output data, to be updated with the actual number of Bytes written. </td></tr>
    <tr><td class="paramname">tag</td><td>The buffer holding the authentication tag. </td></tr>
    <tr><td class="paramname">tag_len</td><td>The length of the authentication tag.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a>, or <a class="el" href="cipher_8h.html#a67ec20c7b124cb258978a41d5c363def">MBEDTLS_ERR_CIPHER_AUTH_FAILED</a> if data is not authentic, or a cipher-specific error code on failure for any other reason.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the data is not authentic, then the output buffer is zeroed out to prevent the unauthentic plaintext being used, making this interface safer. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a65b2df023770ee3123a3f2cdb10497a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65b2df023770ee3123a3f2cdb10497a0">&#9670;&nbsp;</a></span>mbedtls_cipher_auth_encrypt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_auth_encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>iv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>iv_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>ad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ad_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ilen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>olen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>tag_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The generic autenticated encryption (AEAD) function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">iv</td><td>The IV to use, or NONCE_COUNTER for CTR-mode ciphers. </td></tr>
    <tr><td class="paramname">iv_len</td><td>The IV length for ciphers with variable-size IV. This parameter is discarded by ciphers with fixed-size IV. </td></tr>
    <tr><td class="paramname">ad</td><td>The additional data to authenticate. </td></tr>
    <tr><td class="paramname">ad_len</td><td>The length of <code>ad</code>. </td></tr>
    <tr><td class="paramname">input</td><td>The buffer holding the input data. </td></tr>
    <tr><td class="paramname">ilen</td><td>The length of the input data. </td></tr>
    <tr><td class="paramname">output</td><td>The buffer for the output data. Must be able to hold at least <code>ilen</code>. </td></tr>
    <tr><td class="paramname">olen</td><td>The length of the output data, to be updated with the actual number of Bytes written. </td></tr>
    <tr><td class="paramname">tag</td><td>The buffer for the authentication tag. </td></tr>
    <tr><td class="paramname">tag_len</td><td>The desired length of the authentication tag.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a>, or a cipher-specific error code. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="ad3388eaa42a44db6a0b0339dd49f15ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3388eaa42a44db6a0b0339dd49f15ba">&#9670;&nbsp;</a></span>mbedtls_cipher_check_tag()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_check_tag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>tag_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function checks the tag for AEAD ciphers. Only supported with GCM. Must be called after <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">tag</td><td>The buffer holding the tag. </td></tr>
    <tr><td class="paramname">tag_len</td><td>The length of the tag to check.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or a specific error code on failure. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a1c249f6ee1a0d2c906927c7790c41dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c249f6ee1a0d2c906927c7790c41dc5">&#9670;&nbsp;</a></span>mbedtls_cipher_crypt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_crypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>iv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>iv_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ilen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>olen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The generic all-in-one encryption/decryption function, for all ciphers except AEAD constructs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">iv</td><td>The IV to use, or NONCE_COUNTER for CTR-mode ciphers. </td></tr>
    <tr><td class="paramname">iv_len</td><td>The IV length for ciphers with variable-size IV. This parameter is discarded by ciphers with fixed-size IV. </td></tr>
    <tr><td class="paramname">input</td><td>The buffer holding the input data. </td></tr>
    <tr><td class="paramname">ilen</td><td>The length of the input data. </td></tr>
    <tr><td class="paramname">output</td><td>The buffer for the output data. Must be able to hold at least <code>ilen</code> + block_size. Must not be the same buffer as input. </td></tr>
    <tr><td class="paramname">olen</td><td>The length of the output data, to be updated with the actual number of Bytes written.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Some ciphers do not use IVs nor nonce. For these ciphers, use <code>iv</code> = NULL and <code>iv_len</code> = 0.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a>, or <a class="el" href="cipher_8h.html#ac7da041aba839f2ba606eb30f7547b8b">MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED</a> if decryption expected a full block but was not provided one, or <a class="el" href="cipher_8h.html#a06295349279dcbda6b1317924d5bb810">MBEDTLS_ERR_CIPHER_INVALID_PADDING</a> on invalid padding while decrypting, or a cipher-specific error code on failure for any other reason. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a6678691c02cb3f1322b2179987bfffb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6678691c02cb3f1322b2179987bfffb2">&#9670;&nbsp;</a></span>mbedtls_cipher_finish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_finish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>olen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The generic cipher finalization function. If data still needs to be flushed from an incomplete block, the data contained in it is padded to the size of the last block, and written to the <code>output</code> buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">output</td><td>The buffer to write data to. Needs block_size available. </td></tr>
    <tr><td class="paramname">olen</td><td>The length of the data written to the <code>output</code> buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> if parameter verification fails, <a class="el" href="cipher_8h.html#ac7da041aba839f2ba606eb30f7547b8b">MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED</a> if decryption expected a full block but was not provided one, <a class="el" href="cipher_8h.html#a06295349279dcbda6b1317924d5bb810">MBEDTLS_ERR_CIPHER_INVALID_PADDING</a> on invalid padding while decrypting, or a cipher-specific error code on failure for any other reason. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a903c4146b471207690988584b83854a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a903c4146b471207690988584b83854a9">&#9670;&nbsp;</a></span>mbedtls_cipher_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbedtls_cipher_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function frees and clears the cipher-specific context of <code>ctx</code>. Freeing <code>ctx</code> itself remains the responsibility of the caller. </p>

</div>
</div>
<a id="aa585ffa4ded213e5b3160de86e95ec4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa585ffa4ded213e5b3160de86e95ec4b">&#9670;&nbsp;</a></span>mbedtls_cipher_get_block_size()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static unsigned int mbedtls_cipher_get_block_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the block size of the given cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The size of the blocks of the cipher, or zero if <code>ctx</code> has not been initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00374">374</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00235">mbedtls_cipher_info_t::block_size</a>, and <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>.</p>

</div>
</div>
<a id="adae6a0d3f6f0d3e78abbf2f247a06b66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adae6a0d3f6f0d3e78abbf2f247a06b66">&#9670;&nbsp;</a></span>mbedtls_cipher_get_cipher_mode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a> mbedtls_cipher_get_cipher_mode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the mode of operation for the cipher. For example, MBEDTLS_MODE_CBC. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mode of operation, or <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8a4a44bef531861d3e54416b95607e7ebe">MBEDTLS_MODE_NONE</a> if <code>ctx</code> has not been initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00391">391</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, <a class="el" href="cipher_8h_source.html#l00150">MBEDTLS_MODE_NONE</a>, and <a class="el" href="cipher_8h_source.html#l00214">mbedtls_cipher_info_t::mode</a>.</p>

</div>
</div>
<a id="a95179cd977261724298e9bca67a0fcc0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95179cd977261724298e9bca67a0fcc0">&#9670;&nbsp;</a></span>mbedtls_cipher_get_iv_size()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int mbedtls_cipher_get_iv_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the size of the IV or nonce of the cipher, in Bytes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>
If no IV has been set: the recommended IV size. 0 for ciphers not using IV or nonce. </li>
<li>
If IV has already been set: the actual size.</li>
</ul>
</dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00409">409</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, <a class="el" href="cipher_8h_source.html#l00229">mbedtls_cipher_info_t::iv_size</a>, and <a class="el" href="cipher_8h_source.html#l00275">mbedtls_cipher_context_t::iv_size</a>.</p>

</div>
</div>
<a id="a6f6abbb7eadc970085c6ab41145e4812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f6abbb7eadc970085c6ab41145e4812">&#9670;&nbsp;</a></span>mbedtls_cipher_get_key_bitlen()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int mbedtls_cipher_get_key_bitlen </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the key length of the cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The key length of the cipher in bits, or <a class="el" href="cipher_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba27a227b285707a038e87cee36a8d1a65">MBEDTLS_KEY_LENGTH_NONE</a> if ctx <code>has</code> not been initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00462">462</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, <a class="el" href="cipher_8h_source.html#l00220">mbedtls_cipher_info_t::key_bitlen</a>, and <a class="el" href="cipher_8h_source.html#l00179">MBEDTLS_KEY_LENGTH_NONE</a>.</p>

</div>
</div>
<a id="abf1d75d9cb96ed87ab580313f5d0eeda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf1d75d9cb96ed87ab580313f5d0eeda">&#9670;&nbsp;</a></span>mbedtls_cipher_get_name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static const char* mbedtls_cipher_get_name </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the name of the given cipher as a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The name of the cipher, or NULL if <code>ctx</code> has not been not initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00445">445</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, and <a class="el" href="cipher_8h_source.html#l00223">mbedtls_cipher_info_t::name</a>.</p>

</div>
</div>
<a id="a8a9f67bc0f62ae159eecfbe33512e17d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a9f67bc0f62ae159eecfbe33512e17d">&#9670;&nbsp;</a></span>mbedtls_cipher_get_operation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a> mbedtls_cipher_get_operation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the operation of the given cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type of operation: <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fab6bd8754064eab0b5fe2426184542ba6">MBEDTLS_ENCRYPT</a> or <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fa1209c6e6314e7dfa517602d53b6ea8b6">MBEDTLS_DECRYPT</a>, or <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fa3e5a23a347d62ec3075f547516b0e2b3">MBEDTLS_OPERATION_NONE</a> if <code>ctx</code> has not been initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00479">479</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, <a class="el" href="cipher_8h.html#a715666cc823dc180277890b00f8a7f5e">mbedtls_cipher_auth_decrypt()</a>, <a class="el" href="cipher_8h.html#a65b2df023770ee3123a3f2cdb10497a0">mbedtls_cipher_auth_encrypt()</a>, <a class="el" href="cipher_8h.html#ad3388eaa42a44db6a0b0339dd49f15ba">mbedtls_cipher_check_tag()</a>, <a class="el" href="cipher_8h.html#a1c249f6ee1a0d2c906927c7790c41dc5">mbedtls_cipher_crypt()</a>, <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2">mbedtls_cipher_finish()</a>, <a class="el" href="cipher_8h.html#a22b60318022c1947d9893721bc911335">mbedtls_cipher_reset()</a>, <a class="el" href="cipher_8h.html#a570ef5913117fbb2592f75d0d834b51c">mbedtls_cipher_set_iv()</a>, <a class="el" href="cipher_8h.html#afad97d1964a7a98d82488fecd052130f">mbedtls_cipher_set_padding_mode()</a>, <a class="el" href="cipher_8h.html#a027be8bf469069be17d82c4899b3df5f">mbedtls_cipher_setkey()</a>, <a class="el" href="cipher_8h.html#a959598dfef9d7f2add8861e0c518f303">mbedtls_cipher_update()</a>, <a class="el" href="cipher_8h.html#a86bc4ed42ff087c33bb00fe31b049ae7">mbedtls_cipher_update_ad()</a>, <a class="el" href="cipher_8h.html#a8916ddd18e94002913b80a6b04b83693">mbedtls_cipher_write_tag()</a>, <a class="el" href="cipher_8h_source.html#l00172">MBEDTLS_OPERATION_NONE</a>, and <a class="el" href="cipher_8h_source.html#l00255">mbedtls_cipher_context_t::operation</a>.</p>

</div>
</div>
<a id="aa11f687dee08d37b0a9835497b6c94f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa11f687dee08d37b0a9835497b6c94f2">&#9670;&nbsp;</a></span>mbedtls_cipher_get_type()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a> mbedtls_cipher_get_type </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function returns the type of the given cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context of the cipher. Must be initialized.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type of the cipher, or <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569da9551142e177841a57cf75cd357791fea">MBEDTLS_CIPHER_NONE</a> if <code>ctx</code> has not been initialized. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cipher_8h_source.html#l00428">428</a> of file <a class="el" href="cipher_8h_source.html">cipher.h</a>.</p>

<p class="reference">References <a class="el" href="cipher_8h_source.html#l00247">mbedtls_cipher_context_t::cipher_info</a>, <a class="el" href="cipher_8h_source.html#l00097">MBEDTLS_CIPHER_NONE</a>, and <a class="el" href="cipher_8h_source.html#l00211">mbedtls_cipher_info_t::type</a>.</p>

</div>
</div>
<a id="a9b2e7d49ca82abe8c96b65645364e24b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b2e7d49ca82abe8c96b65645364e24b">&#9670;&nbsp;</a></span>mbedtls_cipher_info_from_string()</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_info_from_string </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cipher_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function retrieves the cipher-information structure associated with the given cipher name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cipher_name</td><td>Name of the cipher to search for.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The cipher information structure associated with the given <code>cipher_name</code>, or NULL if not found. </dd></dl>

</div>
</div>
<a id="a8bc2809cbd7c2357f41be8cf76eeed92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bc2809cbd7c2357f41be8cf76eeed92">&#9670;&nbsp;</a></span>mbedtls_cipher_info_from_type()</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_info_from_type </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="cipher_8h.html#a00c5885f1ea7279c5a7d8e12e596569d">mbedtls_cipher_type_t</a>&#160;</td>
          <td class="paramname"><em>cipher_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function retrieves the cipher-information structure associated with the given cipher type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cipher_type</td><td>Type of the cipher to search for.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The cipher information structure associated with the given <code>cipher_type</code>, or NULL if not found. </dd></dl>

</div>
</div>
<a id="a9752d8056c43948c08d2e1f2009a53aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9752d8056c43948c08d2e1f2009a53aa">&#9670;&nbsp;</a></span>mbedtls_cipher_info_from_values()</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_info_from_values </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1b">mbedtls_cipher_id_t</a>&#160;</td>
          <td class="paramname"><em>cipher_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key_bitlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8">mbedtls_cipher_mode_t</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function retrieves the cipher-information structure associated with the given cipher ID, key size and mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cipher_id</td><td>The ID of the cipher to search for. For example, <a class="el" href="cipher_8h.html#af5b069ffd0b2ad31225e42ee4ee29b1ba5a1de07b89c2fa03e102493c92a6d074">MBEDTLS_CIPHER_ID_AES</a>. </td></tr>
    <tr><td class="paramname">key_bitlen</td><td>The length of the key in bits. </td></tr>
    <tr><td class="paramname">mode</td><td>The cipher mode. For example, <a class="el" href="cipher_8h.html#adf5f7524a682fa63093dd0fa608fb2f8ac89f6880c66f742e913bf4f7618a797b">MBEDTLS_MODE_CBC</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The cipher information structure associated with the given <code>cipher_id</code>, or NULL if not found. </dd></dl>

</div>
</div>
<a id="a80354364e91cdb4d4e6ab7ecec65fe07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80354364e91cdb4d4e6ab7ecec65fe07">&#9670;&nbsp;</a></span>mbedtls_cipher_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbedtls_cipher_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes a <code>cipher_context</code> as NONE. </p>

</div>
</div>
<a id="a763ea39a9ccfc20f914fd3391d12a7fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a763ea39a9ccfc20f914fd3391d12a7fc">&#9670;&nbsp;</a></span>mbedtls_cipher_list()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int* mbedtls_cipher_list </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function retrieves the list of ciphers supported by the generic cipher module. </p>
<dl class="section return"><dt>Returns</dt><dd>A statically-allocated array of ciphers. The last entry is zero. </dd></dl>

</div>
</div>
<a id="a22b60318022c1947d9893721bc911335"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22b60318022c1947d9893721bc911335">&#9670;&nbsp;</a></span>mbedtls_cipher_reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_reset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function resets the cipher state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> if parameter verification fails. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a570ef5913117fbb2592f75d0d834b51c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a570ef5913117fbb2592f75d0d834b51c">&#9670;&nbsp;</a></span>mbedtls_cipher_set_iv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_set_iv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>iv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>iv_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the initialization vector (IV) or nonce. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">iv</td><td>The IV to use, or NONCE_COUNTER for CTR-mode ciphers. </td></tr>
    <tr><td class="paramname">iv_len</td><td>The IV length for ciphers with variable-size IV. This parameter is discarded by ciphers with fixed-size IV.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Some ciphers do not use IVs nor nonce. For these ciphers, this function has no effect. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="afad97d1964a7a98d82488fecd052130f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afad97d1964a7a98d82488fecd052130f">&#9670;&nbsp;</a></span>mbedtls_cipher_set_padding_mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_set_padding_mode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cipher_8h.html#a5b57bc07ab7c430e9b4f29f3a5729837">mbedtls_cipher_padding_t</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the padding mode, for cipher modes that use padding. </p>
<p>The default passing mode is PKCS7 padding.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">mode</td><td>The padding mode.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a5093ef5a2ca66691e189c4224098355e">MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE</a> if the selected padding mode is not supported, or <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> if the cipher mode does not support padding. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a027be8bf469069be17d82c4899b3df5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a027be8bf469069be17d82c4899b3df5f">&#9670;&nbsp;</a></span>mbedtls_cipher_setkey()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_setkey </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key_bitlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3f">mbedtls_operation_t</a>&#160;</td>
          <td class="paramname"><em>operation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets the key to use with the given context. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. May not be NULL. Must have been initialized using <a class="el" href="cipher_8h.html#a8bc2809cbd7c2357f41be8cf76eeed92" title="This function retrieves the cipher-information structure associated with the given cipher type...">mbedtls_cipher_info_from_type()</a> or <a class="el" href="cipher_8h.html#a9b2e7d49ca82abe8c96b65645364e24b" title="This function retrieves the cipher-information structure associated with the given cipher name...">mbedtls_cipher_info_from_string()</a>. </td></tr>
    <tr><td class="paramname">key</td><td>The key to use. </td></tr>
    <tr><td class="paramname">key_bitlen</td><td>The key length to use, in bits. </td></tr>
    <tr><td class="paramname">operation</td><td>The operation that the key will be used for: <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fab6bd8754064eab0b5fe2426184542ba6">MBEDTLS_ENCRYPT</a> or <a class="el" href="cipher_8h.html#aaa5f820a58011f938ba3389555ba5b3fa1209c6e6314e7dfa517602d53b6ea8b6">MBEDTLS_DECRYPT</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> if parameter verification fails, or a cipher-specific error code. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a009056b59d69abba5843ce78cd9aae1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a009056b59d69abba5843ce78cd9aae1c">&#9670;&nbsp;</a></span>mbedtls_cipher_setup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_setup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmbedtls__cipher__info__t.html">mbedtls_cipher_info_t</a> *&#160;</td>
          <td class="paramname"><em>cipher_info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes and fills the cipher-context structure with the appropriate values. It also clears the structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The context to initialize. May not be NULL. </td></tr>
    <tr><td class="paramname">cipher_info</td><td>The cipher to use.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> on parameter failure, <a class="el" href="cipher_8h.html#abd30fe33f8b6cf8106e7ea29d3f795cd">MBEDTLS_ERR_CIPHER_ALLOC_FAILED</a> if allocation of the cipher-specific context failed. </dd></dl>

</div>
</div>
<a id="a959598dfef9d7f2add8861e0c518f303"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a959598dfef9d7f2add8861e0c518f303">&#9670;&nbsp;</a></span>mbedtls_cipher_update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_update </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ilen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>olen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The generic cipher update function. It encrypts or decrypts using the given cipher context. Writes as many block-sized blocks of data as possible to output. Any data that cannot be written immediately is either added to the next block, or flushed when <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a> is called. Exception: For MBEDTLS_MODE_ECB, expects a single block in size. For example, 16 Bytes for AES. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">input</td><td>The buffer holding the input data. </td></tr>
    <tr><td class="paramname">ilen</td><td>The length of the input data. </td></tr>
    <tr><td class="paramname">output</td><td>The buffer for the output data. Must be able to hold at least <code>ilen</code> + block_size. Must not be the same buffer as input. </td></tr>
    <tr><td class="paramname">olen</td><td>The length of the output data, to be updated with the actual number of Bytes written.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, <a class="el" href="cipher_8h.html#a6ce4034c4ecd0cd1592232ed8a93d648">MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA</a> if parameter verification fails, <a class="el" href="cipher_8h.html#a5093ef5a2ca66691e189c4224098355e">MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE</a> on an unsupported mode for a cipher, or a cipher-specific error code.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the underlying cipher is GCM, all calls to this function, except the last one before <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a>. Must have <code>ilen</code> as a multiple of the block_size. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a86bc4ed42ff087c33bb00fe31b049ae7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86bc4ed42ff087c33bb00fe31b049ae7">&#9670;&nbsp;</a></span>mbedtls_cipher_update_ad()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_update_ad </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>ad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>ad_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function adds additional data for AEAD ciphers. Only supported with GCM. Must be called exactly once, after <a class="el" href="cipher_8h.html#a22b60318022c1947d9893721bc911335" title="This function resets the cipher state. ">mbedtls_cipher_reset()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">ad</td><td>The additional data to use. </td></tr>
    <tr><td class="paramname">ad_len</td><td>the Length of <code>ad</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or a specific error code on failure. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
<a id="a8916ddd18e94002913b80a6b04b83693"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8916ddd18e94002913b80a6b04b83693">&#9670;&nbsp;</a></span>mbedtls_cipher_write_tag()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_cipher_write_tag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmbedtls__cipher__context__t.html">mbedtls_cipher_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>tag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>tag_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function writes a tag for AEAD ciphers. Only supported with GCM. Must be called after <a class="el" href="cipher_8h.html#a6678691c02cb3f1322b2179987bfffb2" title="The generic cipher finalization function. If data still needs to be flushed from an incomplete block...">mbedtls_cipher_finish()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The generic cipher context. </td></tr>
    <tr><td class="paramname">tag</td><td>The buffer to write the tag to. </td></tr>
    <tr><td class="paramname">tag_len</td><td>The length of the tag to write.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success, or a specific error code on failure. </dd></dl>

<p class="reference">Referenced by <a class="el" href="cipher_8h_source.html#l00479">mbedtls_cipher_get_operation()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue May 8 2018 21:08:41 for mbed TLS v2.7.3 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>