Use one of the registered hashers to hash values.
manager.use() // returns default hasher
manager.use('argon')
Optionalhasher: HasherThe name of the hasher to use, defaults to the configured default
Hash instance for the specified hasher
Enable fake hash drivers to disable actual hashing for testing
Restore normal hashing behavior by disabling fake mode
Check if the value is a valid hash. This method just checks for the formatting of the hash
The value to check
True if the value is a valid hash format
Hash plain text value using the default hasher
The plain text value to hash
Promise resolving to the hashed value
Verify the plain text value against an existing hash
The hashed value to verify against
The plain text value to verify
Promise resolving to true if verification succeeds
Find if the hash value needs a rehash or not.
The hashed value to check
True if the hash needs to be rehashed
Assert the plain value passes the hash verification
The hashed value to verify against
The plain text value to verify
Promise that resolves if verification passes, throws if it fails
Assert the plain value fails the hash verification
The hashed value to verify against
The plain text value to verify
Promise that resolves if verification fails, throws if it passes
HashManager implements the manager/builder pattern to create a use multiple hashing algorithm without self managing hash instance.