hash_password()
public function hash_password(string $password): string
Description
Hashes a plain-text password using bcrypt with the configured cost factor from config/login.php. Uses PHP's built-in password_hash() function with the PASSWORD_DEFAULT algorithm.
Parameters
| Parameter | Type | Description | Default | Required |
|---|---|---|---|---|
| password | string | The plain-text password to hash. | N/A | Yes |
Return Value
| Type | Description |
|---|---|
| string | The bcrypt-hashed password string. |