Argon2iPasswordEncoder
class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingEncoderInterface
Argon2iPasswordEncoder uses the Argon2i hashing algorithm.
Constants
MAX_PASSWORD_LENGTH |
|
Methods
array
demergePasswordAndSalt(string $mergedPasswordSalt)
Demerges a merge password and salt string.
from BasePasswordEncoder
string
mergePasswordAndSalt(string $password, string $salt)
Merges a password and a salt.
from BasePasswordEncoder
bool
comparePasswords(string $password1, string $password2)
Compares two passwords.
from BasePasswordEncoder
bool
isPasswordTooLong(string $password)
Checks if the password is too long.
from BasePasswordEncoder
__construct(int $memoryCost = null, int $timeCost = null, int $threads = null)
Argon2iPasswordEncoder constructor.
static
isSupported()
No description
string
encodePassword(string $raw, string $salt)
Encodes the raw password.
bool
isPasswordValid(string $encoded, string $raw, string $salt)
Checks a raw password against an encoded password.
Details
protected array
demergePasswordAndSalt(string $mergedPasswordSalt)
Demerges a merge password and salt string.
protected bool
comparePasswords(string $password1, string $password2)
Compares two passwords.
This method implements a constant-time algorithm to compare passwords to avoid (remote) timing attacks.