A simple crypto tool for kids 📚
Clone the repo and execute the following command:
go run ./cmdWhen stdin and stdout are connected to a terminal, crypt4kids starts in a full-screen cyberpunk arcade mode powered by Bubble Tea and Lip Gloss.
The arcade mode renders a neon 8-bit terminal cabinet with pixel-art city graphics, cartridge-style algorithm buttons, a plaintext panel, and a cipher output panel.
Arcade controls:
1,2,3,4: select an algorithmt: enter type modeEnter: leave type mode, or encrypt from command modee: encrypt from command modec: clear the text and outputq: quit
Type mode controls:
- regular text keys: edit the plaintext buffer
- left/right arrows: move the input cursor
Backspace/Delete: edit textEsc: leave type mode without encrypting
You can also use crypt4kids as a plain stdin/stdout tool:
printf 'Trendev rox\n' | go run ./cmdUsing the default rot13 algorithm, this prints:
crypt4kids
Algorithm is "ROT13"
Enter your text and it will be translated:
Geraqri ebk
To force plain mode while running from an interactive terminal:
go run ./cmd -plainWhen using -plain interactively, press Ctrl-D to finish the input stream.
Run the local browser arcade:
go run ./cmd -webThen open:
http://127.0.0.1:8787
The browser arcade is an 80s security-game interface with pixel-art operator portraits, a faux-3D vault view, cipher cartridges, and CRT-style plaintext/output panels. Encryption is served by the same local Go cipher code used by the CLI.
Browser controls:
- choose a cipher cartridge:
ROT13,ATBASH,A+B, orB+A - type plaintext in the CRT input panel
ENCRYPT: translate the current textCOPY: copy the latest cipher outputCLEAR: reset the input and output panels
Use a different address if needed:
go run ./cmd -web -addr 127.0.0.1:9090Just run:
docker run -it --rm ghcr.io/trendev/crypt4kidsFor plain streaming mode:
printf 'Trendev rox\n' | docker run -i --rm ghcr.io/trendev/crypt4kidsFor browser arcade mode with Docker:
docker run --rm -p 8787:8787 ghcr.io/trendev/crypt4kids -web -addr :8787Run the following command if you need to get app usage:
docker run -it --rm ghcr.io/trendev/crypt4kids -hAvailable flags:
-alg: set the algorithm. Supported values arerot13,atbash,atbashrot13, androt13atbash. The default isrot13.-addr: set the browser arcade server address. The default is127.0.0.1:8787.-plain: use the line-oriented stdin/stdout interface instead of arcade mode.-web: serve the browser arcade interface.
Examples:
go run ./cmd -alg atbash
printf 'ABC xyz 123\n' | go run ./cmd -alg atbash
go run ./cmd -web