class MessageDigestPasswordEncoder extends BasePasswordEncoder
MessageDigestPasswordEncoder uses a message digest algorithm.
| MAX_PASSWORD_LENGTH |
| __construct(string $algorithm = 'sha512', bool $encodeHashAsBase64 = true, int $iterations = 5000) | ||
| 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. |
| string | $algorithm | The digest algorithm to use |
| bool | $encodeHashAsBase64 | Whether to base64 encode the password hash |
| int | $iterations | The number of iterations to use to stretch the password hash |
Encodes the raw password.
| string | $raw | The password to encode |
| string | $salt | The salt |
| string | The encoded password |
Checks a raw password against an encoded password.
| string | $encoded | An encoded password |
| string | $raw | A raw password |
| string | $salt | The salt |
| bool | true if the password is valid, false otherwise |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.html