Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 3910

php-manual-en-7.2.11-1.mga7.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>Return a list of registered hashing algorithms suitable for hash_hmac</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.hash-hkdf.html">hash_hkdf</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.hash-hmac-file.html">hash_hmac_file</a></div>
 <div class="up"><a href="ref.hash.html">Hash Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.hash-hmac-algos" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">hash_hmac_algos</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0)</p><p class="refpurpose"><span class="refname">hash_hmac_algos</span> &mdash; <span class="dc-title">Return a list of registered hashing algorithms suitable for hash_hmac</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.hash-hmac-algos-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>hash_hmac_algos</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.hash-hmac-algos-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a numerically indexed array containing the list of supported hashing
   algorithms suitable for <span class="function"><a href="function.hash-hmac.html" class="function">hash_hmac()</a></span>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.hash-hmac-algos-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-927">
   <p><strong>Example #1 <span class="function"><strong>hash_hmac_algos()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">hash_hmac_algos</span><span style="color: #007700">());</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>The above example will output
something similar to:</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; md2
    [1] =&gt; md4
    [2] =&gt; md5
    [3] =&gt; sha1
    [4] =&gt; sha224
    [5] =&gt; sha256
    [6] =&gt; sha384
    [7] =&gt; sha512/224
    [8] =&gt; sha512/256
    [9] =&gt; sha512
    [10] =&gt; sha3-224
    [11] =&gt; sha3-256
    [12] =&gt; sha3-384
    [13] =&gt; sha3-512
    [14] =&gt; ripemd128
    [15] =&gt; ripemd160
    [16] =&gt; ripemd256
    [17] =&gt; ripemd320
    [18] =&gt; whirlpool
    [19] =&gt; tiger128,3
    [20] =&gt; tiger160,3
    [21] =&gt; tiger192,3
    [22] =&gt; tiger128,4
    [23] =&gt; tiger160,4
    [24] =&gt; tiger192,4
    [25] =&gt; snefru
    [26] =&gt; snefru256
    [27] =&gt; gost
    [28] =&gt; gost-crypto
    [29] =&gt; haval128,3
    [30] =&gt; haval160,3
    [31] =&gt; haval192,3
    [32] =&gt; haval224,3
    [33] =&gt; haval256,3
    [34] =&gt; haval128,4
    [35] =&gt; haval160,4
    [36] =&gt; haval192,4
    [37] =&gt; haval224,4
    [38] =&gt; haval256,4
    [39] =&gt; haval128,5
    [40] =&gt; haval160,5
    [41] =&gt; haval192,5
    [42] =&gt; haval224,5
    [43] =&gt; haval256,5
)
</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.hash-hmac-algos-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Before PHP 7.2.0 the only means to get a list of supported hash algorithms
    has been to call <span class="function"><a href="function.hash-algos.html" class="function">hash_algos()</a></span> which also returns hash
    algorithms that are not suitable for <span class="function"><a href="function.hash-hmac.html" class="function">hash_hmac()</a></span>.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.hash-hmac-algos-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="function.hash-hmac.html" class="function" rel="rdfs-seeAlso">hash_hmac()</a> - Generate a keyed hash value using the HMAC method</span></li>
   <li class="member"><span class="function"><a href="function.hash-algos.html" class="function" rel="rdfs-seeAlso">hash_algos()</a> - Return a list of registered hashing algorithms</span></li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.hash-hkdf.html">hash_hkdf</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.hash-hmac-file.html">hash_hmac_file</a></div>
 <div class="up"><a href="ref.hash.html">Hash Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>