Packages / rupm

rs-crypto-password 0.1.0

Random password and passphrase generator plus a simple strength estimator

Install

cargo add rs-crypto-password --registry rupm

In Ruststudio: Packages, search for rs-crypto-password, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.

Versions

README

# rs-crypto-password

Random password and passphrase generator plus a simple strength estimator

Add it with `rupm add rs-crypto-password` (or `cargo add rs-crypto-password --registry rupm`).

Randomness comes from /dev/urandom where it exists, otherwise from the standard library's randomly keyed hasher mixed with the clock, with no vetted cryptographic generator behind it. The strength estimate is a rough pool-size heuristic, not a real cracking model. This crate is not meant for security-critical use: for real credentials use your operating system's password manager or an audited crate.

```rust
use rs_crypto_password::{estimate, generate, passphrase, Options};
let pw = generate(&Options::default()).unwrap();
assert_eq!(pw.chars().count(), 16);
let words = passphrase(5, "-").unwrap();
assert_eq!(words.split('-').count(), 5);
let s = estimate("correct horse battery staple");
println!("{:.0} bits, {:?}", s.bits, s.level);
```