Argon2IdHasher
class Argon2IdHasher extends ArgonHasher
Properties
| protected int | $memory | The default memory cost factor. |
from ArgonHasher |
| protected int | $time | The default time cost factor. |
from ArgonHasher |
| protected int | $threads | The default threads factor. |
from ArgonHasher |
| protected bool | $verifyAlgorithm | Indicates whether to perform an algorithm check. |
from ArgonHasher |
Methods
Check the given plain value against a hash.
Determine whether a hash value is present.
Get the algorithm that should be used for hashing.
Check if the given hash has been hashed using the given options.
Verifies that the configuration is less than or equal to what is configured.
Verify the hashed value's algorithm.
Details
in
AbstractHasher at line 14
array
info(string $hashedValue)
Get information about the given hashed value.
at line 17
bool
check(string $value, string|null $hashedValue, array $options = [])
Check the given plain value against a hash.
in
AbstractHasher at line 34
protected bool
hasHash(string|null $hashedValue)
Determine whether a hash value is present.
in
ArgonHasher at line 38
__construct(array $options = [])
Create a new hasher instance.
in
ArgonHasher at line 51
string
make(string $value, array $options = [])
Hash the given value.
at line 33
protected int|string
algorithm()
Get the algorithm that should be used for hashing.
in
ArgonHasher at line 95
bool
needsRehash(string|null $hashedValue, array $options = [])
Check if the given hash has been hashed using the given options.
in
ArgonHasher at line 113
bool
verifyConfiguration(string $hashedValue)
| internal |
Verifies that the configuration is less than or equal to what is configured.
at line 41
protected bool
isUsingCorrectAlgorithm(string $hashedValue)
Verify the hashed value's algorithm.
in
ArgonHasher at line 129
protected bool
isUsingValidOptions(string $hashedValue)
Verify the hashed value's options.
in
ArgonHasher at line 160
ArgonHasher
setMemory(int $memory)
Set the default password memory factor.
Mutates the shared hasher instance held by the HashManager; per-request use races across coroutines.
in
ArgonHasher at line 176
ArgonHasher
setTime(int $time)
Set the default password timing factor.
Mutates the shared hasher instance held by the HashManager; per-request use races across coroutines.
in
ArgonHasher at line 192
ArgonHasher
setThreads(int $threads)
Set the default password threads factor.
Mutates the shared hasher instance held by the HashManager; per-request use races across coroutines.
in
ArgonHasher at line 203
protected int
memory(array $options)
Extract the memory cost value from the options array.
in
ArgonHasher at line 211
protected int
time(array $options)
Extract the time cost value from the options array.
in
ArgonHasher at line 219
protected int
threads(array $options)
Extract the thread's value from the options array.