rune-atbash 0.1.1

Atbash cipher — reverse-alphabet substitution for Latin letters
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 14.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 261.23 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • alexile/runes
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • alexile

rune-atbash

Atbash cipher — reverse-alphabet substitution for Latin letters.

crates.io docs.rs license CI

What it does

rune-atbash encodes and decodes text using the Atbash substitution cipher, mapping each Latin letter to its mirror in the alphabet: A↔Z, B↔Y, C↔X, and so on. Case is preserved; non-letter bytes pass through unchanged. Originally a Hebrew cipher, Atbash appears frequently in CTF challenges, historical texts, and cryptography exercises. Because the mapping is symmetric, the same operation encodes and decodes.

Installation

[dependencies]
rune-atbash = "0.1"

Usage

use rune_atbash::atbash;

let encoded = atbash("Hello, World!");
assert_eq!(encoded, "Svool, Dliow!");

let decoded = atbash(&encoded);
assert_eq!(decoded, "Hello, World!");

CLI

rune-atbash "Hello, World!"          # encode a string
echo "Svool, Dliow!" | rune-atbash  # decode via stdin
rune-atbash -f message.txt           # encode a file

Output

Svool, Dliow!

License

MIT