Skip to content

Repository files navigation

Generate Constant Password

Description

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.

Security

For important security considerations and responsibilities, please read our Security Notice.

Installation

  1. Clone the project:

    git clone https://github.com/gedeontimothy/generate-constant-password.git
    cd generate-constant-password
  2. Install composer dependencies:

    composer install
  3. Configure the environment:

    • Create an env.php file and define the following key:
      return [
          'password_infix' => 'InMiddle', // optional
      ];
  4. Configure character values:

    • Modify the config.php file to define values for each letter:
      return [
          'chars' => [
              'a' => 89,
              'b' => 87,
              'c' => 15,
              'd' => 39,
              // e - z...
          ],
      ];

Usage

  1. Run the following command in a terminal:

    php pass <keyword>

    Example with "Google":

    php pass Google
  2. Enter the base password when prompted:

    Password:
    

    Example:

    Password: mybase123
  3. The generated password will be displayed:

    mybase123InMiddleGoogle12@
    

Customization

  • Infix: Editable in env.php
  • Character values: Editable in config.php

License

This project is licensed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages