Method |
Description |
|
__construct ( string $passwordAlgo, string $cipherMode, string $cipherBlock ) |
Base constructor |
|
createPasswordHash ( string $password ) : string |
Creates a hash from the given $password string. |
|
decrypt ( string $string, string $key ) : string |
Decrypt a string that has been encrypted with the 'encrypt' method. |
|
encrypt ( string $string, string $key ) : string |
Encrypt the given $string using a cypher and the secret $key |
|
generateHardReadableString ( integer $length ) : string |
Generates a random string with a lot of 'noise' (special characters). |
|
generateRandomInt ( integer $min, integer $max ) : integer |
Generates a random integer between the given $min and $max values. |
|
generateRandomString ( integer $length, string $chars = '' ) : string |
Generates a random string using the defined character set. |
|
generateUserReadableString ( integer $length ) : string |
Generates a random string, but without using special characters that are hard to read. |
|
verifyPasswordHash ( string $password, string $hash ) : boolean |
Verify if the given $hash matches the given $password. |
|