HashManager
class HashManager extends Manager implements Hasher mixin Hasher
Traits
Properties
| protected Repository | $config | The configuration repository instance. |
from Manager |
| protected array | $customCreators | The registered custom driver creators. |
from Manager |
| protected array | $drivers | The array of created "drivers". |
from Manager |
Methods
Get the default driver name.
Dynamically call the default driver instance.
Create an instance of the Bcrypt hash Driver.
Create an instance of the Argon2i hash Driver.
Create an instance of the Argon2id hash Driver.
Get information about the given hashed value.
Hash the given value.
Check the given plain value against a hash.
Check if the given hash has been hashed using the given options.
Determine if a given string is already hashed.
Verifies that the configuration is less than or equal to what is configured.
Details
in
RebindsCallbacksToSelf at line 18
protected Closure|null
bindCallbackToSelf(Closure $callback)
Bind the provided callback to the class instance.
at line 99
string
getDefaultDriver()
Get the default driver name.
in
Manager at line 53
mixed
driver(UnitEnum|string|null $driver = null)
Get a driver instance.
in
Manager at line 78
protected mixed
createDriver(string $driver)
Create a new driver instance.
in
Manager at line 99
protected mixed
callCustomCreator(string $driver)
Call a custom driver creator.
in
Manager at line 112
Manager
extend(string $driver, Closure $callback)
Register a custom driver creator Closure.
Boot-only. The callback persists in the singleton's customCreators array for the worker lifetime and applies to every subsequent driver resolution.
in
Manager at line 129
array
getDrivers()
Get all of the created "drivers".
in
Manager at line 151
Manager
setContainer(Container $container)
Set the container instance used by the manager.
Tests only. Swaps the singleton's container reference; per-request use races across coroutines and breaks every concurrent driver resolution through this manager.
in
Manager at line 167
Manager
forgetDrivers()
Forget all of the resolved driver instances.
Boot or tests only. Clears the singleton's driver cache; concurrent coroutines may already hold references that next resolution will not share.
in
Manager at line 177
mixed
__call(string $method, array $parameters)
Dynamically call the default driver instance.
at line 19
BcryptHasher
createBcryptDriver()
Create an instance of the Bcrypt hash Driver.
at line 27
ArgonHasher
createArgonDriver()
Create an instance of the Argon2i hash Driver.
at line 35
Argon2IdHasher
createArgon2idDriver()
Create an instance of the Argon2id hash Driver.
at line 43
array
info(string $hashedValue)
Get information about the given hashed value.
at line 51
string
make(string $value, array $options = [])
Hash the given value.
at line 59
bool
check(string $value, string|null $hashedValue, array $options = [])
Check the given plain value against a hash.
at line 67
bool
needsRehash(string|null $hashedValue, array $options = [])
Check if the given hash has been hashed using the given options.
at line 75
bool
isHashed(string $value)
Determine if a given string is already hashed.
at line 85
bool
verifyConfiguration(string $hashedValue)
| internal |
Verifies that the configuration is less than or equal to what is configured.