Skip to content

avyaanverma/password-generator-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Got it! Here's a README.md file for your password-generator-js repository, incorporating the discussed features, categorized by difficulty, and designed for an official project.


Password Generator JS

A simple yet powerful password generator built with JavaScript, designed to help users create strong and secure passwords with customizable options.

Table of Contents

Features

This project aims to provide a comprehensive set of features for password generation. The features are categorized below from generally easier to harder to implement, providing a roadmap for development and contribution.


Easy to Implement

These features are relatively straightforward to add and can significantly improve the user experience right away.

  • Customizable Password Length:
    • Allow users to specify the desired password length using a slider or a numerical input field. This replaces the fixed sizeValue.
  • "Copy to Clipboard" Button:
    • A dedicated button next to the generated password that, when clicked, copies the password to the user's clipboard for convenient pasting.
  • Regenerate Button:
    • A button that allows users to generate a new password based on the current settings without having to re-adjust any options.
  • Checkbox Options for Character Types:
    • Provide simple checkboxes for users to include or exclude specific character categories:
      • [ ] Include Uppercase Letters (A-Z)
      • [ ] Include Lowercase Letters (a-z)
      • [ ] Include Numbers (0-9)
      • [ ] Include Special Characters (!@#$%^&*()...)
  • Clear Visual Feedback:
    • Briefly highlight or change the background of the password display input when a new password is generated or copied, providing immediate visual confirmation to the user.

Medium Difficulty

These features involve more complex logic or UI interactions but add significant value to the generator's security and usability.

  • Guaranteed Character Type Inclusion:
    • Ensure that the generated password always contains at least one character from each selected category (e.g., if "Uppercase", "Lowercase", "Numbers", and "Special Characters" are checked, the password will have at least one of each). This often involves:
      1. Generating one of each required type.
      2. Filling the remaining length with random characters from all selected types.
      3. Shuffling the entire password string to randomize character positions.
  • Exclusion of Similar Characters:
    • An option to exclude characters that can be easily confused visually, such as 'O' (uppercase O) and '0' (zero), or 'l' (lowercase L) and '1' (one), 'I' (uppercase I).
  • Minimum/Maximum Length Constraints:
    • Enforce minimum and maximum password lengths, providing user feedback if the selected length falls outside these bounds.
  • Password Strength Indicator:
    • A visual indicator (e.g., a progress bar, or text like "Weak," "Medium," "Strong," "Very Strong") that updates dynamically as the password is generated or as the user adjusts the settings. This typically assesses length, character diversity, and other common strength metrics.

Harder Features

These features involve more intricate algorithms, data management, or advanced UI/UX considerations, offering a greater challenge and a more sophisticated tool.

  • Entropy Calculation and Display:
    • Calculate and display the cryptographic entropy (measured in bits) of the generated password. This provides a precise and technical measure of the password's unpredictability and strength.
  • Exclusion of Ambiguous Characters:
    • An option to exclude special characters that might cause issues in certain contexts (e.g., ', ", \, backticks) or have specific meanings in programming languages/shell environments.
  • Custom Character Sets:
    • Allow users to define their own specific set of characters to be included in the password generation (e.g., only hexadecimal characters, or a very specific subset of symbols). This might involve a text area input.
  • Passphrase Generation:
    • Beyond random characters, implement a feature to generate passphrases using a list of random, dictionary-approved words. This often results in strong, yet memorable, passwords (e.g., "correct horse battery staple").
  • Theme Switching (Light/Dark Mode):
    • Allow users to toggle between different visual themes (e.g., light mode and dark mode) for the user interface, improving accessibility and user preference.

How to Use

  1. Open the index.html file in your web browser.
  2. Adjust the password generation settings (length, character types, etc.) using the provided UI elements.
  3. Click the "Generate Password" button.
  4. The generated password will appear in the display box.
  5. (Once implemented) Use the "Copy to Clipboard" button to easily copy the password.

Installation

To get a local copy up and running, follow these simple steps.

  1. Clone the repository:
    git clone https://github.com/your-username/password-generator-js.git
  2. Navigate to the project directory:
    cd password-generator-js
  3. Open index.html: Simply open the index.html file in your preferred web browser. No server setup is required for basic functionality.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

A simple password generator build while learning javascript. Check this out if you wanna see the logic!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published