<?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 => 'ja',
  ),
  '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">この関数は PHP 7.1.0 で
<em>非推奨</em>となり、PHP 7.2.0 で<em>削除</em>
されました。この関数に頼らないことを強く推奨します。</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="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">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">cipher</code></dt>
    <dd>
     <p class="para"><strong><code>MCRYPT_暗号名</code></strong> 定数のいずれか、
あるいはアルゴリズム名をあらわす文字列。</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">定数 <strong><code>MCRYPT_MODE_モード名</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 を必要とするモードで IV が指定されなかった場合は、
この関数は警告を発して <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">戻り値</h3>
  <p class="simpara">
   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>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mcrypt-encrypt.php" class="function" rel="rdfs-seeAlso">mcrypt_encrypt()</a> - 指定したパラメータでプレーンテキストを暗号化する</span></li>
  </ul>
 </div>

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