Custom
in package
implements
Encryption
Implement custom encryption method
Tags
Interfaces, Classes, Traits and Enums
- Encryption
- Define hash and decrypt handler
Table of Contents
- CheckPassword() : bool
- Check password hash Test the given plain password against defined hash
- HashPassword() : false|null|string
- Create password hash creates a secured, salted password hash using the password_hash() method
- RandomPassword() : bool|string
- Generate a password
Methods
CheckPassword()
Check password hash Test the given plain password against defined hash
public
static CheckPassword(string $password, string $hash) : bool
Parameters
- $password : string
-
The raw password
- $hash : string
-
The hashed password
Return values
bool —True whn hash and password are fitting
HashPassword()
Create password hash creates a secured, salted password hash using the password_hash() method
public
static HashPassword(string $password) : false|null|string
Parameters
- $password : string
-
A system user password
Return values
false|null|string —The hashed password
RandomPassword()
Generate a password
public
static RandomPassword([int $length = 12 ]) : bool|string
Parameters
- $length : int = 12