Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.06 KB

File metadata and controls

23 lines (16 loc) · 1.06 KB
layout documentation
current_menu hashing

Hashing

Koselig exposes a Hasher implementation that uses WordPress' underlying hashing functions. It is available using the WPHash facade.

Heads up! If you're using the koselig/koselig as the foundation to your project, you would've had roots/wp-password-bcrypt imported for you which replaces WordPress' old MD5 implementation with a nice new bcrypt one. If you're not using roots/wp-password-bcrypt please keep in mind that WordPress defaults to MD5 and that's probably not what you want.

Examples

// hash the given value
WPHash::make($password);

// check if the given input matches the hash
WPHash::check($_POST['password'], $hashedPasswordFromDb);

// checks if the given password is an old WordPress MD5 hash
WPHash::needsRehash($dbPassword);