Back to projects

Random Password Generator
Niket Girdhar / August 22, 2024
This is a personal project
Password Generator API
This project is a simple API built using Flask that generates a random password based on user-defined criteria. The API also allows users to input a string and apply Caesar cipher encryption to it before using it as part of the generated password.
Features
- Generate a random password with configurable length.
- Option to include/exclude uppercase letters, numbers, and special characters.
- Encrypt user-provided strings using Caesar cipher and incorporate them into the password.
- Randomly shuffle the characters in the password for additional security.
Technologies Used
- Python 3.x
- Flask
- Flask-CORS
API Endpoints
/generate-password
(POST)
This endpoint generates a random password based on the provided criteria.
-
Request Body:
length
: The desired length of the password.include_uppercase
: Boolean value to specify whether uppercase letters should be included.include_numbers
: Boolean value to specify whether numbers should be included.include_special_chars
: Boolean value to specify whether special characters should be included.user_string
: A string to be encrypted using Caesar cipher and included in the password.
-
Response:
- A JSON object with the generated password.
Example:
curl -X POST http://127.0.0.1:5000/generate-password \
-H "Content-Type: application/json" \
-d '{
"length": 12,
"include_uppercase": true,
"include_numbers": true,
"include_special_chars": true,
"user_string": "mypassword"
}'