Skip to content

harshsharma45/RandomPasswordGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Random Password Generator

📖 Overview

This project is a Command-Line Interface (CLI) application that generates cryptographically secure, high-entropy passwords.

Developed as Project 3 for the DecodeLabs Industrial Training Kit (Batch 2026), this tool transitions away from basic scripting toward enterprise-level system architecture. It demonstrates how to leverage Python's standard library to handle security-critical tasks, focusing on cryptographic randomness, memory efficiency, and compliance with modern password standards.

✨ Key Features

  • Cryptographic Security (The secrets Module): Unlike standard generators that use the deterministic random module (which relies on the predictable Mersenne Twister), this tool utilizes Python's secrets module. This taps into hardware-level OS noise to generate truly unpredictable data suitable for enterprise authentication.
  • NIST 2024 Compliance: Aligns with modern security guidelines by prioritizing password length over forced complexity to maximize mathematical information entropy. The system issues a warning if a user attempts to generate a password shorter than the recommended 8 characters.
  • Optimized Memory Management ($O(N)$): Uses the ''.join() method for string generation. This achieves highly efficient linear time complexity by allocating memory exactly once, bypassing the heavy overhead of creating temporary objects in an immutable string concatenation loop.
  • Robust Character Pooling: Dynamically integrates string.ascii_letters, string.digits, and string.punctuation for a locale-independent, maximum-entropy character pool, avoiding tedious and error-prone manual arrays.
  • Defensive Coding: Features a try-except ValueError block to handle invalid, non-numeric user inputs gracefully without crashing the system.

🛠️ Technical Architecture

  • The IPO Scaffold: The application is built on the Input (Integer gathering & validation), Process (Cryptographic selection & string generation), and Output (Secure string delivery) architectural model.
  • Standard Library Integration: Fully relies on verified Python built-in components (secrets and string) to ensure performance optimization and security, rather than using custom arrays or external dependencies.

🚀 Getting Started

Prerequisites

  • Python 3.6+ must be installed on your system (this is required for the secrets module). No external libraries are needed.

Installation & Execution

  1. Clone this repository to your local machine:
    git clone [https://github.com/harshsharma45/RandomPasswordGenerator.git](https://github.com/harshsharma45/RandomPasswordGenerator.git)
    

2. Open your terminal or command prompt.
3. Navigate to the project directory:
```bash
cd RandomPasswordGenerator

  1. Run the application using the following command:
python main.py

(Note: Replace main.py with the actual name of your file if it is different).

💻 Usage Guide

Upon running the script, you will see the main prompt:

Welcome to the Enterprise Random Password Generator
Enter the length of password to generate (Minimum 8 recommended):

  1. Type an integer (e.g., 16) and press Enter.
  2. The engine will instantly calculate and output a cryptographically secure string (e.g., A!B9c$D#ΣA).
  3. If you input a value less than 8, the system will process the request but issue a NIST guideline warning.
  4. If you input a non-integer (like "ten"), the defensive barrier will catch the error and prompt you for valid numerical data.

About

"This enterprise-grade Python CLI application generates cryptographically secure, high-entropy passwords . Architected for backend environments, it leverages the `random` module for true unpredictability and complies with NIST 2024 length guidelines.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages