A simple yet effective command-line Java application to generate strong, random passwords based on your specified criteria. You can customize the length of the password and choose which character sets to include: uppercase letters, lowercase letters, digits, and special characters.
- Customizable Length: Specify the exact length of the password you need.
- Character Set Selection: Choose to include or exclude uppercase letters, lowercase letters, digits, and special characters.
- Secure Randomness: Utilizes Java's
SecureRandomclass for cryptographically strong random number generation, ensuring the generated passwords are unpredictable. - Command-Line Interface: Easy to use directly from your terminal.
- Clear Output: Displays the generated password in the console.
- Java Development Kit (JDK): Ensure you have Java installed on your system. You can download it from Oracle's website or use an open-source distribution like OpenJDK.
-
Clone the Repository:
git clone [https://github.com/khemraj-git/random_password_generator.git](https://github.com/khemraj-git/random_password_generator.git) cd random_password_generator -
Compilation:
- Navigate to the directory containing the
PasswordGenerator.javafile (likely the root of the repository) and compile it:javac PasswordGenerator.java
- Navigate to the directory containing the
-
Running the Application:
- Navigate to the directory containing the compiled
.classfile and run the application:java PasswordGenerator
- Navigate to the directory containing the compiled
-
Following the Prompts: The application will then prompt you to enter the desired length of the password and whether to include uppercase letters, lowercase letters, digits, and special characters (by typing
yfor yes ornfor no).Enter the length of the password: 16 Include uppercase letters? (y/n): y Include lowercase letters? (y/n): y Include digits? (y/n): y Include special characters? (y/n): y Generated password: aB3!dFgH7jKlMnOp
Contributions are welcome! If you have any ideas for improvements, bug fixes, or new features, feel free to:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.