# rune-atbash
> Atbash cipher — reverse-alphabet substitution for Latin letters.
[](https://crates.io/crates/rune-atbash)
[](https://docs.rs/rune-atbash)
[](LICENSE)
[](https://github.com/alexile/runes/actions)
## 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
```toml
[dependencies]
rune-atbash = "0.1"
```
## Usage
```rust
use rune_atbash::atbash;
let encoded = atbash("Hello, World!");
assert_eq!(encoded, "Svool, Dliow!");
let decoded = atbash(&encoded);
assert_eq!(decoded, "Hello, World!");
```
## CLI
```bash
rune-atbash "Hello, World!" # encode a string
```
## Output
```
Svool, Dliow!
```
## License
MIT