This PHP CLI tool generates a unique password based on a constant pattern using a keyword provided as an argument, a base password, and an infix defined in a configuration file.
For important security considerations and responsibilities, please read our Security Notice.
-
Clone the project:
git clone https://github.com/gedeontimothy/generate-constant-password.git cd generate-constant-password -
Install composer dependencies:
composer install
-
Configure the environment:
- Create an
env.phpfile and define the following key:return [ 'password_infix' => 'InMiddle', // optional ];
- Create an
-
Configure character values:
- Modify the
config.phpfile to define values for each letter:return [ 'chars' => [ 'a' => 89, 'b' => 87, 'c' => 15, 'd' => 39, // e - z... ], ];
- Modify the
-
Run the following command in a terminal:
php pass <keyword>
Example with "Google":
php pass Google
-
Enter the base password when prompted:
Password:Example:
Password: mybase123
-
The generated password will be displayed:
mybase123InMiddleGoogle12@
- Infix: Editable in
env.php - Character values: Editable in
config.php
This project is licensed under the MIT License. See LICENSE for more information.