Commaaa2
This commit is contained in:
@@ -45,7 +45,7 @@ class ArgonHasher extends AbstractHasher implements HasherContract
|
||||
{
|
||||
$this->time = $options['time'] ?? $this->time;
|
||||
$this->memory = $options['memory'] ?? $this->memory;
|
||||
$this->threads = $options['threads'] ?? $this->threads;
|
||||
$this->threads = $this->threads($options);
|
||||
$this->verifyAlgorithm = $options['verify'] ?? $this->verifyAlgorithm;
|
||||
}
|
||||
|
||||
@@ -180,13 +180,17 @@ class ArgonHasher extends AbstractHasher implements HasherContract
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the threads value from the options array.
|
||||
* Extract the thread's value from the options array.
|
||||
*
|
||||
* @param array $options
|
||||
* @return int
|
||||
*/
|
||||
protected function threads(array $options)
|
||||
{
|
||||
if (defined('PASSWORD_ARGON2_PROVIDER') && PASSWORD_ARGON2_PROVIDER === 'sodium') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return $options['threads'] ?? $this->threads;
|
||||
}
|
||||
}
|
||||
|
||||
0
vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php
vendored
Normal file → Executable file
0
vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php
vendored
Normal file → Executable file
0
vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php
vendored
Normal file → Executable file
0
vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php
vendored
Normal file → Executable file
8
vendor/laravel/framework/src/Illuminate/Hashing/composer.json
vendored
Normal file → Executable file
8
vendor/laravel/framework/src/Illuminate/Hashing/composer.json
vendored
Normal file → Executable file
@@ -14,9 +14,9 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2.5|^8.0",
|
||||
"illuminate/contracts": "^7.0",
|
||||
"illuminate/support": "^7.0"
|
||||
"php": "^7.3|^8.0",
|
||||
"illuminate/contracts": "^8.0",
|
||||
"illuminate/support": "^8.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "7.x-dev"
|
||||
"dev-master": "8.x-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
|
||||
Reference in New Issue
Block a user