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

contributors($setup);

?>
<div id="function.mhash" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mhash</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mhash</span> &mdash; <span class="dc-title">Computes hash</span></p>

 </div>

 <div id="function.mhash-refsynopsisdiv">
  <div class="warning"><strong class="warning">Увага</strong><p class="simpara">Ця функція
<em>ЗАСТАРІЛА</em>, починаючи з PHP 8.1.0. Вкрай не рекомендується
на неї покладатися.</p></div>
 </div>
 
 <div class="refsect1 description" id="refsect1-function.mhash-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>mhash</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$algo</code></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"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$key</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</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">
   <span class="function"><strong>mhash()</strong></span> applies a hash function specified by
   <code class="parameter">algo</code> to the <code class="parameter">data</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mhash-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">algo</code></dt>
     <dd>
      <p class="para">
       The hash ID. One of the <strong><code>MHASH_hashname</code></strong> constants.
      </p>
     </dd>
    
    
     <dt><code class="parameter">data</code></dt>
     <dd>
      <p class="para">
       The user input, as a string.
      </p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       If specified, the function will return the resulting HMAC instead.
       HMAC is keyed hashing for message authentication, or simply a message
       digest that depends on the specified key. Not all algorithms 
       supported in mhash can be used in HMAC mode.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mhash-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the resulting hash (also called digest) or HMAC as a string, or
   <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mhash-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.1.0</td>
       <td>
        This function has been deprecated.
        Use the <a href="ref.hash.php" class="link"><code class="literal">hash_*()</code> functions</a> instead.
       </td>
      </tr>

      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">key</code> is now nullable.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

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