<?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-decrypt.php',
    1 => 'mcrypt_decrypt',
    2 => 'Decrypts crypttext with given parameters',
  ),
  'up' => 
  array (
    0 => 'ref.mcrypt.php',
    1 => 'Mcrypt Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.mcrypt-create-iv.php',
    1 => 'mcrypt_create_iv',
  ),
  'next' => 
  array (
    0 => 'function.mcrypt-enc-get-algorithms-name.php',
    1 => 'mcrypt_enc_get_algorithms_name',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mcrypt/functions/mcrypt-decrypt.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mcrypt-decrypt" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mcrypt_decrypt</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_decrypt</span> &mdash; <span class="dc-title">Decrypts crypttext with given parameters</span></p>

 </div>
 <div id="function.mcrypt-decrypt-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-decrypt-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mcrypt_decrypt</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$cipher</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$mode</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$iv</code><span class="initializer"> = ?</span></span><br>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   Decrypts the <code class="parameter">data</code> and returns the unencrypted data.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.mcrypt-decrypt-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">key</code></dt>
    <dd>
     <span class="simpara">
      The key with which the data was encrypted. If the provided key size is
      not supported by the cipher, the function will emit a warning and return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
     </span>
    </dd>
   
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <span class="simpara">
      The data that will be decrypted with the given <code class="parameter">cipher</code>
      and <code class="parameter">mode</code>. If the size of the data is not n * blocksize,
      the data will be padded with &#039;<code class="literal">\0</code>&#039;.
     </span>
    </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>
    </dd>
   
   
    <dt><code class="parameter">iv</code></dt>
    <dd>
     <p class="para">Used for the initialization in CBC, CFB, OFB modes, and in some algorithms in STREAM mode. If the provided IV size is not supported by the chaining mode or no IV was provided, but the chaining mode requires one, the function will emit a warning and return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mcrypt-decrypt-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns the decrypted data as a string  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mcrypt-decrypt-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mcrypt-encrypt.php" class="function" rel="rdfs-seeAlso">mcrypt_encrypt()</a> - Encrypts plaintext with given parameters</span></li>
  </ul>
 </div>

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