Ciphers
ROT-13
A Caesar with shift 13, so it's its own inverse. Encode twice and you're back.
Cipher / Shift
ROT-13
Caesar with shift 13, its own inverse.
- Keyspace
- 1
- Decode
- self-inverse
- Works on
- A-Z, the rest passes
- Family
- 3 in shift
no options
Access
- Create
create("rot13") - CLI
ciphers encode rot13 'HELLO WORLD' - Tryplayground with the sample above
- Kincaesar, rot47
Thirteen is half of 26, so shifting twice is a full turn. encode and decode do the same thing, and info().selfInverse admits it. One key, hides nothing. It's the Usenet way of keeping a spoiler out of immediate view, and that's all it was ever for.
const rot13 = create("rot13");
rot13.encode("HELLO").text; // "URYYB"
rot13.encode("URYYB").text; // "HELLO"
rot13.encode("Hello, World! 123").text; // "Uryyb, Jbeyq! 123"
Letters only. Digits and punctuation pass through, and that's the whole difference from ROT-47.