Skip to content

Mudhiraj005/Password_Strength_Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Password Strength Checker (Java)

A clean and beginner-friendly Java console application that validates password strength using
conditional logic and regular expressions.

πŸ“Œ This project is designed for learning input validation, regex usage, and basic security rules.


✨ Features

βœ” Password length validation (8–16 characters)
βœ” Must contain at least:

  • πŸ”‘ One lowercase letter
  • πŸ”  One uppercase letter
  • πŸ”’ One digit
  • πŸ” One special character (! @ # $ % ^ & *)
    βœ” Displays clear and specific error messages for invalid passwords

πŸ› οΈ Technologies Used

  • Java
  • String.matches()
  • Regular Expressions (Regex)
  • Scanner (for user input)

πŸ“‚ Project Structure


▢️ How to Run

  1. Compile the program : javac PasswordChecker.java
  2. Run the program : java PasswordChecker
  3. Enter a password when prompted.

🧠 Password Rules

Rule Requirement
Length 8 to 16 characters
Lowercase At least one a–z
Uppercase At least one A–Z
Digit At least one 0–9
Special Character At least one !@#$%^&*

πŸ“Œ Sample Output

Strong password

Enter your Password: Abc@1234 Password was accepted and It is strong.

Weak password

Enter your Password: abc123 Doesn't contains UpperCase letter. Re-enter password. It is weak.


🎯 Learning Outcomes

  • Understand how password validation works
  • Learn practical usage of String.matches() in Java
  • Practice conditional logic and input handling
  • Build a beginner-level security validation program

πŸš€ Future Enhancements

  • Add retry mechanism until a valid password is entered
  • Refactor logic into a single regex pattern
  • Add GUI using Swing or JavaFX
  • Add unit tests for validation logic

πŸ‘€ Author

Puneeth Beginner Java & Cybersecurity Enthusiast


⭐ Feel free to star the repository if you find it useful!

About

Beginner Java project to validate password strength using regex and conditions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages