<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.openssl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.openssl-digest.php',
    1 => 'openssl_digest',
    2 => 'Computes a digest',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Функції OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-dh-compute-key.php',
    1 => 'openssl_dh_compute_key',
  ),
  'next' => 
  array (
    0 => 'function.openssl-encrypt.php',
    1 => 'openssl_encrypt',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/openssl/functions/openssl-digest.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-digest" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_digest</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_digest</span> &mdash; <span class="dc-title">Computes a digest</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-digest-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_digest</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$digest_algo</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$binary</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <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">
   Computes a digest hash value for the given data using a given method,
   and returns a raw or binhex encoded string.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-digest-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">data</code></dt>
     <dd>
      <p class="para">
       The data.
      </p>
     </dd>
    
    
     <dt><code class="parameter">digest_algo</code></dt>
     <dd>
      <p class="para">
       The digest method to use, e.g. &quot;sha256&quot;, see <span class="function"><a href="function.openssl-get-md-methods.php" class="function">openssl_get_md_methods()</a></span> for a list of available digest methods.
      </p>
     </dd>
    
    
     <dt><code class="parameter">binary</code></dt>
     <dd>
      <p class="para">
       Setting to <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> will return as raw output data, otherwise the return
       value is binhex encoded.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


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


 <div class="refsect1 errors" id="refsect1-function.openssl-digest-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para">
   Emits an <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> level error if an unknown signature algorithm
   is passed via the <code class="parameter">digest_algo</code> parameter.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.openssl-digest-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.openssl-get-md-methods.php" class="function" rel="rdfs-seeAlso">openssl_get_md_methods()</a> - Gets available digest methods</span></li>
   </ul>
  </p>
 </div>


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