<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.sodium.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.sodium-crypto-generichash.php',
    1 => 'sodium_crypto_generichash',
    2 => 'Renvoie un hachage du message',
  ),
  'up' => 
  array (
    0 => 'ref.sodium.php',
    1 => 'Sodium Fonctions',
  ),
  'prev' => 
  array (
    0 => 'function.sodium-crypto-core-ristretto255-sub.php',
    1 => 'sodium_crypto_core_ristretto255_sub',
  ),
  'next' => 
  array (
    0 => 'function.sodium-crypto-generichash-final.php',
    1 => 'sodium_crypto_generichash_final',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/sodium/functions/sodium-crypto-generichash.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.sodium-crypto-generichash" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">sodium_crypto_generichash</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0, PHP 8)</p><p class="refpurpose"><span class="refname">sodium_crypto_generichash</span> &mdash; <span class="dc-title">Renvoie un hachage du message</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.sodium-crypto-generichash-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>sodium_crypto_generichash</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code><span class="initializer"> = &quot;&quot;</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$length</code><span class="initializer"> = <strong><code><a href="sodium.constants.php#constant.sodium-crypto-generichash-bytes">SODIUM_CRYPTO_GENERICHASH_BYTES</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="simpara">
   Hache un message avec BLAKE2b.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.sodium-crypto-generichash-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
    <dt><code class="parameter">message</code></dt>
    <dd>
     <span class="simpara">
      Le message à hacher.
     </span>
    </dd>
   
   
    <dt><code class="parameter">key</code></dt>
    <dd>
     <span class="simpara">
      (Optionnel) clé cryptographique. Cela sert à la même fonction qu&#039;une clé HMAC, mais elle est
      utilisée comme une section réservée de l&#039;état interne de BLAKE2.
     </span>
    </dd>
   
   
    <dt><code class="parameter">length</code></dt>
    <dd>
     <span class="simpara">
      La taille de la sortie.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sodium-crypto-generichash-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="simpara">
   Le hachage cryptographique en tant que chaîne binaire brute. Si une sortie hexadécimale est désirée,
   le résultat peut être passé à <span class="function"><a href="function.sodium-bin2hex.php" class="function">sodium_bin2hex()</a></span>.
  </p>
 </div>


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