Create a new Hash instance with the specified driver
The hash driver implementation to use
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
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
Hash and verify values using a dedicated hash driver. The Hash works as an adapter across different drivers.