Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 4995

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Decrypts data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-csr-sign.html">openssl_csr_sign</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-dh-compute-key.html">openssl_dh_compute_key</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-decrypt" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_decrypt</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0)</p><p class="refpurpose"><span class="refname">openssl_decrypt</span> &mdash; <span class="dc-title">Decrypts data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-decrypt-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>openssl_decrypt</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$method</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$iv</code><span class="initializer"> = &quot;&quot;</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   Takes a raw or base64 encoded string and decrypts it using a given method and key.
  </p>

  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is
currently not documented; only its argument list is available.
</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-decrypt-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">data</code></em></span>
     <dd>

      <p class="para">
       The data.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">method</code></em></span>
     <dd>

      <p class="para">
       The cipher method.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">password</code></em></span>
     <dd>

      <p class="para">
       The password.
      </p>
     </dd>

    </dt>

    <dt>

      <span class="term"><em><code class="parameter">options</code></em></span>
      <dd>

       <p class="para">
        <em><code class="parameter">options</code></em> can be one of
        <strong><code>OPENSSL_RAW_DATA</code></strong>,
        <strong><code>OPENSSL_ZERO_PADDING</code></strong>.
       </p>
      </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">iv</code></em></span>
     <dd>

      <p class="para">
       A non-NULL Initialization Vector. 
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-decrypt-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   The decrypted string on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.openssl-decrypt-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Emits an <strong><code>E_WARNING</code></strong> level error if an unknown cipher algorithm
   is passed via the <em><code class="parameter">method</code></em> parameter.
  </p>
  <p class="para">
   Emits an <strong><code>E_WARNING</code></strong> level error if an empty value is passed
   in via the <em><code class="parameter">iv</code></em> parameter.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-decrypt-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>5.3.3</td>
      <td>
       The <em><code class="parameter">iv</code></em> parameter was added.
      </td>
     </tr>

     <tr>
      <td>5.4.0</td>
      <td>
       The <em><code class="parameter">raw_output</code></em> was changed to <em><code class="parameter">options</code></em>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.openssl-decrypt-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.openssl-encrypt.html" class="function" rel="rdfs-seeAlso">openssl_encrypt()</a> - Encrypts data</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-csr-sign.html">openssl_csr_sign</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-dh-compute-key.html">openssl_dh_compute_key</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>