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).

Sample Code

from anythingpassword import generatekey, loadkey, passencrypt, passdecrypt, passgenerator, passanalyzer passentropy, passcracktime, passexpiration, passcommon

--- Generate a new key and save it ---

key = generatekey() print("Encryption key generated and saved.")

--- Load the saved key ---

loaded_key = loadkey() print("Encryption key loaded.")

--- Generate a password ---

password = passgenerator(12) print(f"Generated Password: {password}")

--- Analyze password strength ---

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

--- Check 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 and decrypt password ---

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

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

--- Check expiration (simulate creation 100 days ago) ---

creation_time = datetime.now() - timedelta(days=100) expired, status = passexpiration(creation_time) print(f"Expiration Check: {status}")

--- Check against common passwords list ---

is_common, msg = passcommon(password) print(f"Common Password Check: {msg}")

Installation

pip install anythingpassword

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.2.tar.gz (485.2 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.2-py3-none-any.whl (508.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anythingpassword-0.2.2.tar.gz
  • Upload date:
  • Size: 485.2 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.2.tar.gz
Algorithm Hash digest
SHA256 d64c24aad5ed1f8792ec7e11e83a29587b3105417d929bf32ecb2ed3aee04aa7
MD5 f1e3ed3843ac3b8aa4d857c8264a12f3
BLAKE2b-256 721b51727a93eb6761dc524adbcb64ea4059aca5b1abdeda3371b560a8adfd10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for anythingpassword-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 badfc5d8f7b5dea3d31f895368cc4a66697b921dd4032c26806500abf9294803
MD5 07dcdc548308d419e3aeeb8d385af2fa
BLAKE2b-256 cfeb4915322a02a29cabd4cc141997ce6277e97bd15e5016b3cb6dfd9bb4d17f

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