<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.sodium-crypto-pwhash-str-verify.php',
    1 => 'sodium_crypto_pwhash_str_verify',
    2 => 'Verifies that a password matches a hash',
  ),
  'up' => 
  array (
    0 => 'ref.sodium.php',
    1 => 'Sodium Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.sodium-crypto-pwhash-str-needs-rehash.php',
    1 => 'sodium_crypto_pwhash_str_needs_rehash',
  ),
  'next' => 
  array (
    0 => 'function.sodium-crypto-scalarmult.php',
    1 => 'sodium_crypto_scalarmult',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sodium/functions/sodium-crypto-pwhash-str-verify.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.sodium-crypto-pwhash-str-verify" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">sodium_crypto_pwhash_str_verify</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0, PHP 8)</p><p class="refpurpose"><span class="refname">sodium_crypto_pwhash_str_verify</span> &mdash; <span class="dc-title">Verifies that a password matches a hash</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.sodium-crypto-pwhash-str-verify-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>sodium_crypto_pwhash_str_verify</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$hash</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">$password</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Checks that a password hash created using <span class="function"><a href="function.sodium-crypto-pwhash-str.php" class="function">sodium_crypto_pwhash_str()</a></span> matches a given plain-text password. Note that the parameters are in the opposite order to the same parameters in the similar <span class="function"><a href="function.password-verify.php" class="function">password_verify()</a></span> function.
  </p>


 </div>


 <div class="refsect1 parameters" id="refsect1-function.sodium-crypto-pwhash-str-verify-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">hash</code></dt>
    <dd>
     <span class="simpara">
      Ein Hash, der durch <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> erzeugt wurde.
     </span>
    </dd>
   
   
    <dt><code class="parameter">password</code></dt>
    <dd>
     <span class="simpara">
      Das Passwort des Benutzers.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sodium-crypto-pwhash-str-verify-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the password and hash match, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.sodium-crypto-pwhash-str-verify-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <span class="simpara">
    Hashes are calculated using the Argon2ID algorithm, providing resistance to both GPU and side-channel attacks.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.sodium-crypto-pwhash-str-verify-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.sodium-crypto-pwhash-str.php" class="function" rel="rdfs-seeAlso">sodium_crypto_pwhash_str()</a> - Get an ASCII-encoded hash</span></li>
   <li><span class="function"><a href="function.password-hash.php" class="function" rel="rdfs-seeAlso">password_hash()</a> - Erstellt einen Passwort-Hash</span></li>
   <li><span class="function"><a href="function.password-verify.php" class="function" rel="rdfs-seeAlso">password_verify()</a> - &Uuml;berpr&uuml;ft, ob ein Passwort und ein Hash zusammenpassen</span></li>
  </ul>
 </div>


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