<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mcrypt.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.mcrypt-get-iv-size.php',
    1 => 'mcrypt_get_iv_size',
    2 => 'Returns the size of the IV belonging to a specific cipher/mode combination',
  ),
  'up' => 
  array (
    0 => 'ref.mcrypt.php',
    1 => 'Mcrypt Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.mcrypt-get-cipher-name.php',
    1 => 'mcrypt_get_cipher_name',
  ),
  'next' => 
  array (
    0 => 'function.mcrypt-get-key-size.php',
    1 => 'mcrypt_get_key_size',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mcrypt/functions/mcrypt-get-iv-size.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mcrypt-get-iv-size" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mcrypt_get_iv_size</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5, PHP 7 &lt; 7.2.0, PECL mcrypt &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">mcrypt_get_iv_size</span> &mdash; <span class="dc-title">Returns the size of the IV belonging to a specific cipher/mode combination</span></p>

 </div>
 <div id="function.mcrypt-get-iv-size-refsynopsisdiv">
  <div class="warning"><strong class="warning">Avviso</strong><p class="simpara">This function has been
<em>DEPRECATED</em> as of PHP 7.1.0 and
<em>REMOVED</em> as of PHP 7.2.0. Relying on this function
is highly discouraged.</p></div>
 </div>
 <div class="refsect1 description" id="refsect1-function.mcrypt-get-iv-size-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mcrypt_get_iv_size</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$cipher</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$mode</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="simpara">
   Gets the size of the IV belonging to a specific
   <code class="parameter">cipher</code>/<code class="parameter">mode</code> combination.
  </p>
  <p class="simpara">
   It is more useful to use the <span class="function"><a href="function.mcrypt-enc-get-iv-size.php" class="function">mcrypt_enc_get_iv_size()</a></span>
   function as this uses the resource returned by
   <span class="function"><a href="function.mcrypt-module-open.php" class="function">mcrypt_module_open()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mcrypt-get-iv-size-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">cipher</code></dt>
    <dd>
     <p class="para">Una tra le costanti <strong><code>MCRYPT_ciphername</code></strong>, oppure il nome dell&#039;algoritmo sotto forma di stringa.</p>
    </dd>
   
   
    <dt><code class="parameter">mode</code></dt>
    <dd>
     <p class="para">Una tra le costanti <strong><code>MCRYPT_MODE_modename</code></strong>, oppure una tra le seguenti stringhe: &quot;ecb&quot;, &quot;cbc&quot;, &quot;cfb&quot;, &quot;ofb&quot;, &quot;nofb&quot; o &quot;stream&quot;.</p>
     <span class="simpara">
      The IV is ignored in ECB mode as this mode does not require it. You will
      need to have the same IV (think: starting point) both at encryption and
      decryption stages, otherwise your encryption will fail.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mcrypt-get-iv-size-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns the size of the Initialization Vector (IV) in bytes. On error the
   function returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>. If the IV is ignored in the specified cipher/mode
   combination zero is returned.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mcrypt-get-iv-size-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>mcrypt_get_iv_size()</strong></span> Example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />    </span><span style="color: #007700">echo </span><span style="color: #0000BB">mcrypt_get_iv_size</span><span style="color: #007700">(</span><span style="color: #0000BB">MCRYPT_CAST_256</span><span style="color: #007700">, </span><span style="color: #0000BB">MCRYPT_MODE_CFB</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />    echo </span><span style="color: #0000BB">mcrypt_get_iv_size</span><span style="color: #007700">(</span><span style="color: #DD0000">'des'</span><span style="color: #007700">, </span><span style="color: #DD0000">'ecb'</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mcrypt-get-iv-size-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mcrypt-get-block-size.php" class="function" rel="rdfs-seeAlso">mcrypt_get_block_size()</a> - Gets the block size of the specified cipher</span></li>
   <li><span class="function"><a href="function.mcrypt-enc-get-iv-size.php" class="function" rel="rdfs-seeAlso">mcrypt_enc_get_iv_size()</a> - Returns the size of the IV of the opened algorithm</span></li>
   <li><span class="function"><a href="function.mcrypt-create-iv.php" class="function" rel="rdfs-seeAlso">mcrypt_create_iv()</a> - Creates an initialization vector (IV) from a random source</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>