rs-random/README.md
2025-05-28 22:30:59 -05:00

73 lines
2.3 KiB
Markdown

# rs-random
**Secure String Generator**
A minimal, blazing-fast Rust command-line tool for generating secure random strings with the tiniest possible footprint. Perfect for standalone use or integration into other applications.
## Features
- Uses operating system entropy (`OsRng`) for cryptographically secure randomness
- Flexible selection of character sets, including alphabets, numbers, symbols, and more
- Very small binary size
- Minimal dependencies
## About
I created `rs-random` to have a super simple, minimal way to generate secure strings that I could build into other applications, ensuring security, speed, and a tiny footprint.
## Installation
### Windows
Download the latest Windows executable from the [releases page](https://git.caileb.com/Caileb/rs-random/releases).
### From Source
```bash
git clone https://git.caileb.com/Caileb/rs-random.git
cd rs-random
cargo build --release
```
## Usage
```bash
rs-random [LENGTH]
rs-random -l <LENGTH> [-s <SETS>] [-c <COUNT>]
rs-random -h
```
- `LENGTH` &lt;number&gt;: Length of each string (default: `16`)
- `-l <LENGTH>`: Specify the string length
- `-s <SETS>`: Comma-separated list of character sets to include (default: `lowercase,uppercase,numbers,special-safe`)
- `-c <COUNT>`: Number of strings to generate (default: `1`)
- `-h`: Show help information
### Available Character Sets
| Name | Description |
| ---------------- | ---------------------------------------- |
| lowercase | English lowercase letters (a-z) |
| uppercase | English uppercase letters (A-Z) |
| numbers | Numbers (0-9) |
| special | Special characters |
| special-safe | Safe special chars (no pipes/brackets) |
| cyrillic-lower | Cyrillic lowercase letters |
| cyrillic-upper | Cyrillic uppercase letters |
| greek-lower | Greek lowercase letters |
| greek-upper | Greek uppercase letters |
| symbols | Extended symbols (©®, ™, €, £, etc.) |
### Examples
Generate a single 32-character string (default sets):
```bash
rs-random 32
```
Generate five 12-character strings using only lowercase and numbers:
```bash
rs-random -l 12 -s lowercase,numbers -c 5
```