<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.mcrypt-decrypt.php',
    1 => 'mcrypt_decrypt',
    2 => 'Decrypts crypttext with given parameters',
  ),
  'up' => 
  array (
    0 => 'ref.mcrypt.php',
    1 => 'Функції Mcrypt',
  ),
  '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">Увага</strong><p class="simpara">Ця функція
<em>ЗАСТАРІЛА</em>, починаючи з PHP 7.1.0, та
<em>ВИЛУЧЕНА</em> в PHP 7.2.0. Вкрай не рекомендується на неї
покладатися.</p></div>
 </div>
 <div class="refsect1 description" id="refsect1-function.mcrypt-decrypt-description">
  <h3 class="title">Опис</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="para rdfs-comment">
   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">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">cipher</code></dt>
     <dd>
      <p class="para">Одна з констант
<strong><code>MCRYPT_ciphername</code></strong> або назва алгоритму у вигляді
рядка.</p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       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>
      </p>
     </dd>
    
    
     <dt><code class="parameter">data</code></dt>
     <dd>
      <p class="para">
       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;.
      </p>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">Одна з констант
<strong><code>MCRYPT_MODE_modename</code></strong> або один з рядків: &quot;ecb&quot;, &quot;cbc&quot;,
&quot;cfb&quot;, &quot;ofb&quot;, &quot;nofb&quot;, &quot;stream&quot;.</p>
     </dd>
    
    
     <dt><code class="parameter">iv</code></dt>
     <dd>
      <p class="para">Використовується для ініціалізації в
режимах CBC, CFB, OFB, а також в деяких алгоритмах у режимі STREAM. Якщо
вказаний IV-розмір не підтримується в режимі ланцюга або IV взагалі не вказано,
проте він необхідний для режиму ланцюга, функція видасть попередження та поверне
<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.</p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.mcrypt-decrypt-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the decrypted data as a string  або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mcrypt-decrypt-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <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>
  </p>
 </div>

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