#password-generator #generator #password #token #crypto-resistant #library

passgen-lib

Library for generating cryptographically secure passwords/tokens and other sets and sequences

7 stable releases

Uses new Rust 2024

1.2.0 Feb 21, 2025
1.1.0 Jan 5, 2025
1.0.4 Dec 8, 2024
1.0.3 Nov 30, 2024

#512 in Authentication

Download history 72/week @ 2024-12-01 223/week @ 2024-12-08 168/week @ 2024-12-15 57/week @ 2024-12-22 80/week @ 2024-12-29 292/week @ 2025-01-05 173/week @ 2025-01-12 48/week @ 2025-01-19 59/week @ 2025-01-26 57/week @ 2025-02-02 7/week @ 2025-02-09 111/week @ 2025-02-16 34/week @ 2025-02-23 39/week @ 2025-03-02 48/week @ 2025-03-09 9/week @ 2025-03-16

177 downloads per month
Used in 2 crates

MIT license

335KB
206 lines

alt text

Latest version Download docs.rs MIT Build Status made-with-rust

Readme in different languages: EN RU

⚙ Passgen-lib

Library for generating cryptographically secure passwords/tokens and other sets and sequences.

CSPRNGs Isaac64Rng and Hc128Rng are used.

alt text

Usage

Include library to your project Cargo.toml:

[dependencies]
passgenlib = "1.2.0"

You can create a strong token 30 characters long including all leterals, numbers and special symbols:

let result = Passgen::default().generate(30);

You can create a strong and usability password with default 8 characters long:

let result = Passgen::default_strong_and_usab().generate(8);

You can create a set from your custom charset 12 characters long:

let result = Passgen::new().set_custom_charset("abcABC123⭕➖❎⚫⬛п₼⁂🙂").generate(12);

Example of library integration in the passgen-cmd tool and passgen-telegram service.

Library doc.

License

MIT

Our other passgen projects:

passgen-desktop

passgen-console-linuxwin

passgen-cmd

passgen-telegram

Dependencies

~1.5MB
~19K SLoC