Problem/Motivation
Split from #1845004: Replace custom password hashing library with PHP password_hash() (see comment #161).
After #1845004: Replace custom password hashing library with PHP password_hash(), only PasswordInterface::check()
has a naming not aligned to PHP >=5.5.0 password hashing functions. The corresponding name should be ::verify()
corresponding to PHP password_verify()
.
Proposed resolution
Because we want to keep BC...
- Add a new interface
interface PasswordHashInterface extends PasswordInterface { public function verify($password, $hash); }
- Deprecate
PasswordInterface::check()
- Use ::verify() everywhere in core instead of ::check()
A starting point is the interdiff.txt from #1845004-162: Replace custom password hashing library with PHP password_hash().
Remaining tasks
None.
User interface changes
None.
API changes
New interface
interface PasswordHashInterface extends PasswordInterface {
public function verify($password, $hash);
}