Argon2IdHasher

class Argon2IdHasher extends ArgonHasher (View source)

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

array info(string $hashedValue)

Get information about the given hashed value.

from AbstractHasher
bool check(string $value, string $hashedValue, array $options = [])

Check the given plain value against a hash.

void __construct(array $options = [])

Create a new hasher instance.

from ArgonHasher
string make(string $value, array $options = [])

Hash the given value.

from ArgonHasher
int algorithm()

Get the algorithm that should be used for hashing.

bool needsRehash(string $hashedValue, array $options = [])

Check if the given hash has been hashed using the given options.

from ArgonHasher
$this setMemory(int $memory)

Set the default password memory factor.

from ArgonHasher
$this setTime(int $time)

Set the default password timing factor.

from ArgonHasher
$this setThreads(int $threads)

Set the default password threads factor.

from ArgonHasher
int memory(array $options)

Extract the memory cost value from the options array.

from ArgonHasher
int time(array $options)

Extract the time cost value from the options array.

from ArgonHasher
int threads(array $options)

Extract the threads value from the options array.

from ArgonHasher

Details

array info(string $hashedValue)

Get information about the given hashed value.

Parameters

string $hashedValue

Return Value

array

bool check(string $value, string $hashedValue, array $options = [])

Check the given plain value against a hash.

Parameters

string $value
string $hashedValue
array $options

Return Value

bool

Exceptions

RuntimeException

void __construct(array $options = [])

Create a new hasher instance.

Parameters

array $options

Return Value

void

string make(string $value, array $options = [])

Hash the given value.

Parameters

string $value
array $options

Return Value

string

Exceptions

RuntimeException

protected int algorithm()

Get the algorithm that should be used for hashing.

Return Value

int

bool needsRehash(string $hashedValue, array $options = [])

Check if the given hash has been hashed using the given options.

Parameters

string $hashedValue
array $options

Return Value

bool

$this setMemory(int $memory)

Set the default password memory factor.

Parameters

int $memory

Return Value

$this

$this setTime(int $time)

Set the default password timing factor.

Parameters

int $time

Return Value

$this

$this setThreads(int $threads)

Set the default password threads factor.

Parameters

int $threads

Return Value

$this

protected int memory(array $options)

Extract the memory cost value from the options array.

Parameters

array $options

Return Value

int

protected int time(array $options)

Extract the time cost value from the options array.

Parameters

array $options

Return Value

int

protected int threads(array $options)

Extract the threads value from the options array.

Parameters

array $options

Return Value

int

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Hashing/Argon2IdHasher.html