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

passgen-lib

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

6 stable releases

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

#545 in Authentication

Download history 197/week @ 2024-11-27 131/week @ 2024-12-04 170/week @ 2024-12-11 121/week @ 2024-12-18 54/week @ 2024-12-25 283/week @ 2025-01-01 165/week @ 2025-01-08 107/week @ 2025-01-15 37/week @ 2025-01-22 88/week @ 2025-01-29 16/week @ 2025-02-05

269 downloads per month
Used in 2 crates

MIT license

20KB
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.

Usage

Include library to your project Cargo.toml:

[dependencies]
passgenlib = "1.1.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.

Library doc.

License

MIT

Dependencies

~420KB