Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 583 Bytes

Md5-and-Sha1-PasswordHasher.md

File metadata and controls

15 lines (10 loc) · 583 Bytes

Md5 and Sha1 Password Hasher

Warning: Both hashers exist only for legacy reasons! Don't use them for new projects!

See the official php password hashing FAQ.

You should only use them together with the FallbackPasswordHasher so you can migrate you old insecure hashes to a new hash algorithm.

$hasher = new Md5PasswordHasher();
$hasher->setSalt('some-salt');

$hash = $hasher->hash('password');
$check = $hasher->check('password', 'hashedpasswordvalue');