Skip to main content

This Python application provides a suite of tools for generating, analyzing, encrypting, and managing passwords securely.

Project description

AnythingPassword

Password Management and Encryption Application

Overview

This Python application provides a suite of tools for generating, analyzing, encrypting, and managing passwords securely. It includes functionality to generate strong random passwords, evaluate password strength, calculate password entropy and crack time, check for password expiration, and detect common passwords. Additionally, it supports secure password encryption and decryption using the Fernet symmetric encryption algorithm, with the encryption key stored securely in the same directory as the script.

The application is designed to be modular, secure, and user-friendly, with robust error handling and platform compatibility (Unix-like systems and Windows).


✨ Features

🔑 Password Generation

  • Generates random passwords of specified length using a mix of lowercase, uppercase, digits, and special characters.
  • Default length is 8 characters if not specified.

🛡️ Password Strength Analysis

  • Evaluates passwords based on length, character types (uppercase, lowercase, digits, special characters), and commonality.
  • Provides feedback and a strong password suggestion if the input password is weak.
  • Checks against a list of common passwords.

📊 Password Security Metrics

  • Calculates password entropy (in bits) to measure randomness.
  • Estimates the time required to crack a password via brute force in seconds, minutes, or hours.
  • Checks if a password has expired based on a creation timestamp and maximum age (default 90 days).

🔐 Password Encryption/Decryption

  • Encrypts passwords using a securely generated Fernet key.
  • Decrypts encrypted passwords using the same key.
  • Stores the encryption key securely in the script’s directory with restricted permissions.

🗝️ Key Management

  • Generates and saves a Fernet key to a file (encryption_key.key) in the script’s directory.
  • Loads the key from the file for encryption/decryption.
  • Ensures secure file permissions (owner-only read/write on Unix-like systems).

📦 Installation

pip install anythingpassword

## Sample Usage
from anythingpassword import (
    generatekey,
    loadkey,
    passencrypt,
    passdecrypt,
    passgenerator,
    passanalyzer,
    passentropy,
    passcracktime,
    passexpiration,
    passcommon
)
from datetime import datetime, timedelta

# Generate and save a new encryption key
key = generatekey()
print("Encryption key generated and saved.")

# Load the encryption key
loaded_key = loadkey()
print("Encryption key loaded.")

# Generate a random password
password = passgenerator(12)
print(f"Generated Password: {password}")

# Analyze password strength
is_strong, feedback = passanalyzer(password)
print("Strength Check:")
print(feedback)

# Calculate password entropy
entropy = passentropy(password)
print(f"Password Entropy: {entropy} bits")

# Estimate crack time
crack_time_sec = passcracktime(password, unit='sec')
print(f"Estimated Crack Time: {crack_time_sec} seconds")

# Encrypt the password
encrypted_pass = passencrypt(password, loaded_key)
print(f"Encrypted Password: {encrypted_pass}")

# Decrypt the password
decrypted_pass = passdecrypt(encrypted_pass, loaded_key)
print(f"Decrypted Password: {decrypted_pass}")

# Check if the password is expired (e.g. created 100 days ago)
creation_time = datetime.now() - timedelta(days=100)
expired, status = passexpiration(creation_time)
print(f"Expiration Check: {status}")

# Check if the password is common (e.g. in known data breaches)
is_common, msg = passcommon(password)
print(f"Common Password Check: {msg}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anythingpassword-0.2.3.tar.gz (485.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anythingpassword-0.2.3-py3-none-any.whl (508.7 kB view details)

Uploaded Python 3

File details

Details for the file anythingpassword-0.2.3.tar.gz.

File metadata

  • Download URL: anythingpassword-0.2.3.tar.gz
  • Upload date:
  • Size: 485.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for anythingpassword-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d09b52bbf9734cbacf198c66fe7ab6e8a66e401e6aee8cfb2f9682f2b564f3cb
MD5 a3d0fb66aab6c0404a71fc21fc17682b
BLAKE2b-256 25dce878cf5d6905a1c1d0c069ae8dfc30c6105f07eae4a9aea2c975c1c42eb0

See more details on using hashes here.

File details

Details for the file anythingpassword-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for anythingpassword-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c79cd51cd67e7531be2259ee26f0198080ef0fa62fa0a3482edf7b9e3f7e629
MD5 f5e9b06fd0f92be8cc365e046c6c83da
BLAKE2b-256 489759a115ae14af9ed21c4ea28917ab81424a6518a42cdbed889dd66dc99130

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page