rust_unique_pass

Crates.iorust_unique_pass
lib.rsrust_unique_pass
version0.10.0
created_at2023-10-09 16:38:49.942474+00
updated_at2025-12-30 19:05:00.247436+00
descriptionA CLI tool for generating a strong password.
homepage
repositoryhttps://github.com/Neuron-Grid/rust_unique_pass
max_upload_size
id998240
size244,556
Neuron Grid (Neuron-Grid)

documentation

https://docs.rs/rust_unique_pass

README

Language: English | 日本語

Rust Unique Pass

This software is designed to generate random strong passwords.
Users can customize the length of their passwords and the special characters they use.
Except for the FTL files for translation, everything is written in the Rust language.

Install

Please make sure that the Rust language is installed beforehand.
If not, please install it from the official website.
If it is already installed, run the following command.

cargo install rust_unique_pass

Usage

It is a CLI tool and should be run from the command line.
The command name is rupass.

Command-Line Options

rupass provides several command-line options to control password generation.

Option (Short) Option (Long) Description
-l --language Language for prompts/messages (eng default, also jpn, deu).
-p --password-length Password length. Required when --no-prompt is used.
-a --all Enable all character classes (numbers, uppercase, lowercase, symbols).
--no-prompt Non-interactive: skip all questions; unspecified classes stay OFF (errors if none chosen).
-n --numbers / --no-numbers Include / exclude numbers (default OFF).
-u --uppercase / --no-uppercase Include / exclude uppercase (default OFF).
-w --lowercase / --no-lowercase Include / exclude lowercase (default OFF).
-s --symbols / --no-symbols Include / exclude symbols (default OFF; default set ~!@#$%^&*_-+=(){}[]:;<>,.?/).
--symbols-set Custom symbols set to use with --symbols.
--timeout-ms (--budget-ms) Time budget for strength search (>=10). Default: 150. Advanced
--min-score Early-stop target score (0..=4). Default: 4. Advanced
--strict Fail (exit 3) if target not reached within budget. Advanced
--show-strength Print strength (score/entropy) on success.
--quiet (--porcelain) Output password only; suppress headings/warnings. Advanced

Command Examples:

  • If you specify nothing, all character classes start OFF and the CLI will ask interactively. With --no-prompt, you must provide --password-length and at least one class flag (e.g., --numbers or --all), otherwise it errors.

  • Generate a 32-character password including numbers, uppercase, lowercase, and symbols:

    rupass -p 32 -n -u -w -s
    
  • Generate a password with prompts in Japanese:

    rupass -l jpn
    

Time-budgeted strength search

  • By default, the generator searches up to 150 ms for a candidate that reaches zxcvbn score 4.
  • It stops early as soon as the target score is reached. If not reached within the budget, it uses the best candidate and prints a warning to stderr (unless --strict or --quiet).
  • Use --show-strength to print a strength line like Strength: 4/4 (entropy: 82.3 bits).
  • In --strict mode, the program exits with code 3 if the target score is not met within the budget and does not print the password.

Security & Scope

  • Threat model: local CLI usage on a trusted machine. This project focuses on generating strong passwords; it does not protect against attackers with live process memory access or compromised OS.
  • Side-channel notes: timing-safe helpers are best-effort and their runtime scales with input length. Do not assume strict constant-time guarantees.
  • Entropy policy: production paths use OS entropy per byte; deterministic RNGs are used only in tests.
  • 64-bit targets: only 64-bit is supported. A build-time guard is enforced; you can override it with --features allow-32bit for experimental builds.

About Language Settings

  • Languages supported
    • Japanese language
    • English language
    • German language

For use in languages other than English, specify the language code defined in ISO 639-3.
The command can be used in Japanese by making the following changes.

rupass -l jpn

precautions

  • Default language setting is English.
  • The language can be specified with the -l option.
  • Password length is constrained by both character count and UTF-8 byte length.
  • 32-bit targets are not supported.
    • The -l option is not required when using the English language.
    • english use example
    rupass
    

Request for collaboration.

This project is intended to be multilingual. If you would like to help with translation, please see CONTRIBUTING.

License

This software is released under the Apache License 2.0.
See LICENSE for details.

Copyright © 2023 Neuron Grid.
Licensed under the Apache License 2.0.

Commit count: 95

cargo fmt