|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/nikkilgupta.edukrypt.in/vendor/laravel/framework/src/Illuminate/Hashing/ |
Upload File : |
<?php
namespace Illuminate\Hashing;
use RuntimeException;
class Argon2IdHasher extends ArgonHasher
{
/**
* Check the given plain value against a hash.
*
* @param string $value
* @param string $hashedValue
* @param array $options
* @return bool
*
* @throws \RuntimeException
*/
public function check($value, $hashedValue, array $options = [])
{
if ($this->verifyAlgorithm && $this->info($hashedValue)['algoName'] !== 'argon2id') {
throw new RuntimeException('This password does not use the Argon2id algorithm.');
}
if (strlen($hashedValue) === 0) {
return false;
}
return password_verify($value, $hashedValue);
}
/**
* Get the algorithm that should be used for hashing.
*
* @return int
*/
protected function algorithm()
{
return PASSWORD_ARGON2ID;
}
}