PasswordEncoderInterface
in
PasswordEncoderInterface is the interface for all encoders.
Tags
Table of Contents
- encodePassword() : string
- Encodes the raw password.
- isPasswordValid() : bool
- Checks a raw password against an encoded password.
Methods
encodePassword()
Encodes the raw password.
public
encodePassword(string $raw, string|null $salt) : string
Parameters
- $raw : string
-
The password to encode
- $salt : string|null
-
The salt
Tags
Return values
string —The encoded password
isPasswordValid()
Checks a raw password against an encoded password.
public
isPasswordValid(string $encoded, string $raw, string|null $salt) : bool
Parameters
- $encoded : string
-
An encoded password
- $raw : string
-
A raw password
- $salt : string|null
-
The salt
Tags
Return values
bool —true if the password is valid, false otherwise