Documentation

PlaintextPasswordHasher
in package
implements LegacyPasswordHasherInterface Uses CheckPasswordLengthTrait

PlaintextPasswordHasher does not do any hashing but is useful in testing environments.

As this hasher is not cryptographically secure, usage of it in production environments is discouraged.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Interfaces

LegacyPasswordHasherInterface
Provides password hashing and verification capabilities for "legacy" hashers that require external salts.

Properties

$ignorePasswordCase  : bool

Methods

__construct()  : mixed
hash()  : string
Hashes a plain password.
needsRehash()  : bool
verify()  : bool
Checks that a plain password and a salt match a password hash.
isPasswordTooLong()  : bool
mergePasswordAndSalt()  : string

Properties

Methods

__construct()

public __construct([bool $ignorePasswordCase = false ]) : mixed
Parameters
$ignorePasswordCase : bool = false

Compare password case-insensitive

hash()

Hashes a plain password.

public hash(string $plainPassword[, string $salt = null ]) : string
Parameters
$plainPassword : string
$salt : string = null
Return values
string

needsRehash()

public needsRehash(string $hashedPassword) : bool
Parameters
$hashedPassword : string
Return values
bool

verify()

Checks that a plain password and a salt match a password hash.

public verify(string $hashedPassword, string $plainPassword[, string $salt = null ]) : bool
Parameters
$hashedPassword : string
$plainPassword : string
$salt : string = null
Return values
bool

isPasswordTooLong()

private isPasswordTooLong(string $password) : bool
Parameters
$password : string
Return values
bool

mergePasswordAndSalt()

private mergePasswordAndSalt(string $password, string|null $salt) : string
Parameters
$password : string
$salt : string|null
Return values
string

        
On this page

Search results