#random #password-generator #uuid #name-generator

hubworld

A Rust library for generating random data: UUIDs, names, passwords, and credit cards

4 releases

0.3.1 Mar 8, 2026
0.3.0 Mar 8, 2026
0.1.3 Nov 5, 2025
0.1.1 Nov 5, 2025

#1123 in Algorithms

MIT license

35KB
736 lines

HubWorld

A Rust library for generating random data: UUIDs, names, passwords, and credit cards.

Features

  • 🔐 UUID Generation - Generate random UUID v4
  • 👤 Name Generation - Generate random first names, last names, and full names
  • 🔑 Password Generation - Generate secure random passwords with customizable length
  • 💳 Credit Card Generation - Generate valid (Luhn) credit card numbers by brand or random

Installation

Add this to your Cargo.toml:

[dependencies]
hubworld = "0.1.0"

Usage

UUID Generation

use hubworld::generate_uuid;

let id = generate_uuid();
println!("Generated UUID: {}", id);

Name Generation

use hubworld::{generate_first_name, generate_last_name, generate_full_name};

let first_name = generate_first_name();
let last_name = generate_last_name();
let full_name = generate_full_name();

println!("First: {}, Last: {}, Full: {}", first_name, last_name, full_name);

Password Generation

use hubworld::{generate_password, password::generate_password_with_length};

// Default length (16 characters)
let password = generate_password();

// Custom length
let long_password = generate_password_with_length(32);

Credit Card Generation

use hubworld::{
    generate_credit_card,
    generate_credit_card_for_brand,
    generate_credit_card_for_brand_name,
    CardBrand
};

// Random brand (Visa, Mastercard, Amex, Discover)
let random_card = generate_credit_card();

// Specific brand
let visa = generate_credit_card_for_brand(CardBrand::Visa);
let mastercard = generate_credit_card_for_brand(CardBrand::Mastercard);
let amex = generate_credit_card_for_brand(CardBrand::AmericanExpress);
let discover = generate_credit_card_for_brand(CardBrand::Discover);

// Brand name as string
let union_pay = generate_credit_card_for_brand_name("UnionPay");
let diners = generate_credit_card_for_brand_name("Diners Club International");
let verve = generate_credit_card_for_brand_name("Verve (payment cards)");

Contribuindo

Contribuições são muito bem-vindas! Veja o arquivo CONTRIBUTING.md para mais detalhes.

License

Este projeto é open source e está licenciado sob a MIT license.

Dependencies

~570KB