Skip to content
bitanonPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Bitanon Toolbox

Hash, encode, encrypt and generate in your browser at bitanon.dev/toolbox, on the command line with bitanon, or from an AI agent with bitanon mcp.

  • Verified. Every tool runs on a Bitanon library (convertlib, hashlib, cipherlib) that is tested against the official test vectors of its specification. This engine re-checks known answers on the Dart VM and in the compiled JavaScript before every deploy.
  • Private. Everything runs on your device: in a Web Worker on the site, locally for the command and the MCP server. Nothing is uploaded.
  • Open. BSD-3-Clause, like the libraries.

What's here

This repository is the engine: one Dart function, runJson(op, argsJson), that wraps the libraries behind plain JSON. The site compiles it to JavaScript, and the bitanon command and MCP server below run the same engine.

Operation What it does Library
hash SHA-2, SHA-3, SHAKE (any length), Keccak, BLAKE2, RIPEMD, SM3, SHA-1, MD5, MD4, MD2, CRC, Adler-32, xxHash hashlib
hmac, blake2mac HMAC with any of the cryptographic hashes above, keyed BLAKE2 hashlib
convert Text, hex, binary, octal, decimal, Base32 (4 alphabets), Base36, Base45, Base58 (3), Base62, Base64 (URL-safe, unpadded), Base85, Z85, percent (URL) encoding convertlib
punycode Punycode labels and internationalized domain names convertlib
argon2Hash, argon2Verify Argon2id, Argon2i, Argon2d hashlib
bcryptHash, bcryptVerify bcrypt hashlib
scrypt, pbkdf2 Key derivation hashlib
aeadEncrypt, aeadDecrypt AES-GCM, ChaCha20-Poly1305, XChaCha20-Poly1305 cipherlib
aes AES in ECB, CBC, CTR, CFB, CFB8, OFB, CCM, PCBC, IGE and XTS modes, with PKCS#7, ANSI X9.23, ISO 7816-4, zero or no padding cipherlib
mlkem ML-KEM-512/768/1024 key exchange cipherlib
uuid, random, totp, hotp UUID v1/3/4/5/6/7, secure random bytes and strings, TOTP and HOTP codes hashlib
import 'package:bitanon_toolbox/engine.dart';

print(runJson('hash', '{"input": "abc", "algorithms": ["sha256"]}'));
// {"ok":true,"bytes":3,"results":[{"id":"sha256","name":"SHA-256","value":"ba7816bf..."}]}

Errors come back as {"ok": false, "error": "..."} with a message meant for the person using the tool.

Command line

Linux and macOS (installs to ~/.local/bin):

curl -fsSL https://raw.githubusercontent.com/bitanon/toolbox/main/install.sh | sh

Windows (PowerShell; installs to %LOCALAPPDATA%\bitanon\bin and adds it to your PATH):

irm https://raw.githubusercontent.com/bitanon/toolbox/main/install.ps1 | iex

Both download the binary for your system from the latest release and check it against the release's SHA256SUMS. Set BITANON_VERSION to pick a version, or BITANON_INSTALL_DIR to install elsewhere. You can also download a binary from the releases page yourself, or, with the Dart SDK, install from source:

dart pub global activate --source git https://github.com/bitanon/toolbox

Use

bitanon hash abc
bitanon hash --file archive.zip --algorithm sha256,blake2b256
echo -n "hello" | bitanon convert --to base64
bitanon aead-encrypt "secret" --key $(bitanon random --length 32)
bitanon uuid --version 7 --count 3
bitanon help                             # every tool; bitanon help <tool> for options

Data comes from the argument, --file, or standard input (read byte for byte). --json prints the full result. Exit codes: 0 success, 1 failure or no match, 2 usage mistake.

MCP server

bitanon mcp is a Model Context Protocol server on stdio that offers every tool to AI agents, so they compute hashes, encodings and keys with tested code instead of guessing. It reads nothing from disk and makes no network requests.

{
  "mcpServers": {
    "bitanon": { "command": "/home/you/.local/bin/bitanon", "args": ["mcp"] }
  }
}

With Claude Code: claude mcp add bitanon -- ~/.local/bin/bitanon mcp. If bitanon is on your PATH, the bare name works as the command.

Development

dart pub upgrade          # newest published libraries (no lockfile on purpose)
dart test -p vm           # known-answer tests
dart compile js -O2 --no-source-maps web/main.dart -o build/engine.js
node tool/check_js.mjs build/engine.js   # the same answers in JavaScript

dart run bin/bitanon.dart hash abc       # the command, from source
dart compile exe bin/bitanon.dart -o build/bitanon
node tool/check_cli.mjs build/bitanon    # the binary, end to end

lib/src/catalog.dart lists the tools once; the command's flags, its help and the MCP schemas all come from it. Releases: bump version: in pubspec.yaml and lib/src/version.dart, rename # _next_ in the CHANGELOG to # X.Y.Z, and push that commit to main. CI sees the untagged version, builds the binaries, and creates the vX.Y.Z tag and GitHub release.

The web pages live in bitanon/bitanon.github.io (src/pages/toolbox/), which builds this engine on every deploy.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages