Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
az4ifPublic archive

About

A password, passphrase, and username generator with a Rust/WASM core. Runs entirely client-side, deploys to GitHub Pages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Keyforge

A password, passphrase, and username generator with a Rust core compiled to WebAssembly. Everything runs client-side — nothing is sent to a server, and generation history is kept only in the browser's local storage.

  • Rust core (src/): character-set password generation, word-list passphrases, and username/email alias generation, plus entropy estimation. Covered by unit tests in src/lib.rs.
  • Frontend (web/): plain HTML/CSS/JS. No build step of its own — it loads the compiled wasm module from web/pkg/, which is generated at build time (see below).

Username / email alias types

Type Example output Notes
Plus-addressed email you+amazon@gmail.com Enter your real inbox; works with Gmail, Outlook, Fastmail, iCloud and most others
Catch-all email amazon@yourdomain.com Requires a domain you control with catch-all mail enabled
Forwarded email alias word-word.amazon@simplelogin.co Supported services: SimpleLogin, Addy.io, Firefox Relay, DuckDuckGo, Fastmail, iCloud
Random word botanical42 Single word with optional number
Adjective + noun botanicalOtter42 Two-word handle with optional capitalization and number

Deploying to GitHub Pages

This repo includes .github/workflows/deploy.yml, which on every push to main:

  1. Installs Rust with the wasm32-unknown-unknown target
  2. Builds the crate with wasm-pack build --release --target web --out-dir web/pkg
  3. Publishes the web/ folder to GitHub Pages

To turn it on:

  1. Push this repo to GitHub.
  2. Go to Settings → Pages and set Source to GitHub Actions.
  3. Push to main (or run the workflow manually from the Actions tab). The first run takes a minute or two; your site will be live at https://<username>.github.io/<repo>/ once it finishes.

The compiled web/pkg/ folder is intentionally not committed — CI rebuilds it from source on every push, so the deployed wasm always matches the Rust code in the repo.

Building locally

You'll need Rust, the wasm32-unknown-unknown target, and wasm-pack:

rustup target add wasm32-unknown-unknown
cargo install wasm-pack

wasm-pack build --release --target web --out-dir web/pkg

Then serve web/ with any static file server (opening index.html directly via file:// won't work — wasm modules must be fetched over http). For example:

cd web
python3 -m http.server 8000
# open http://localhost:8000

Testing the generation logic

The core logic has native unit tests that don't require the wasm target:

cargo test

Customizing

  • Word lists live in src/words.rs — swap in your own for different passphrase/username vocabulary.
  • Colors, type, and layout tokens are at the top of web/style.css.
  • Special-character set and ambiguous-character list are constants near the top of src/lib.rs.
  • Alias service domains are in the AliasService::domain() impl in src/lib.rs — add new services by extending the enum and match arm.

About

A password, passphrase, and username generator with a Rust/WASM core. Runs entirely client-side, deploys to GitHub Pages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages