Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder
Pbkdf2PasswordEncoder uses the PBKDF2 (Password-Based Key Derivation Function 2).
Providing a high level of Cryptographic security,
PBKDF2 is recommended by the National Institute of Standards and Technology (NIST).
But also warrants a warning, using PBKDF2 (with a high number of iterations) slows down the process.
PBKDF2 should be used with caution and care.
- Author: Sebastiaan Stok <s.stok@rollerscapes.net>
Synopsis
class Pbkdf2PasswordEncoder
extends BasePasswordEncoder
{
- // members
- private $algorithm;
- private $encodeHashAsBase64;
- private $iterations;
- private $length;
- // methods
- public void __construct()
- public void encodePassword()
- public void isPasswordValid()
- private void hashPbkdf2()
- // Inherited methods from BasePasswordEncoder
- protected array demergePasswordAndSalt()
- protected string mergePasswordAndSalt()
- protected Boolean comparePasswords()
Hierarchy
Members
private
- $algorithm
- $encodeHashAsBase64
- $iterations
- $length
Methods
private
public
- __construct() — Constructor.
- encodePassword() — {@inheritdoc}
- isPasswordValid() — {@inheritdoc}
Inherited from Symfony\Component\Security\Core\Encoder\BasePasswordEncoder
protected
- comparePasswords() — Compares two passwords.
- demergePasswordAndSalt() — Demerges a merge password and salt string.
- mergePasswordAndSalt() — Merges a password and a salt.