An open API service indexing awesome lists of open source software.

https://github.com/marfullsen/rot13-transcoder

Website to translate the Caesar's cipher (rotation system).
https://github.com/marfullsen/rot13-transcoder

caesar-cipher encryption foundation

Last synced: 6 months ago
JSON representation

Website to translate the Caesar's cipher (rotation system).

Awesome Lists containing this project

README

          

# Rot13 Transcoder
[![Foundation version](https://img.shields.io/badge/Foundation-6.6.3-blue.svg)](https://get.foundation/)
[![JS](https://img.shields.io/badge/Vanilla-JavaScript-yellow.svg)](https://www.javascript.com/)
[![Github.io](https://img.shields.io/badge/GitHub%20Pages-Rot13%20transcoder-green.svg)](https://Marfullsen.github.io/rot13-transcoder/)

[![Screenshot](./screenshot_rot13_index.png)](https://Marfullsen.github.io/rot13-transcoder/)
---

## Description

[Site](https://Marfullsen.github.io/rot13-transcoder/) for encrypting and decrypting ciphertext with [rot13](https://en.wikipedia.org/wiki/ROT13).

---

## History

ROT13 is a special case of the encryption algorithm known as a Caesar cipher, used by Julius Caesar in the 1st century BC

---

## How it works

The cipher consists of replacing each letter of the alphabet with the letter that is thirteen positions ahead, thus, each letter would be as follows:

| Input | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz |
| --- | --- |
| Output | NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm |

An example of the use of encryption would be:

__The Quick Brown Fox Jumps Over The Lazy Dog.__

>_Gur Dhvpx Oebja Sbk Whzcf Bire Gur Ynml Qbt._

---

## Usage when download the repo.
1. Install `git`.
2. Clone, enter the directory and open directly with any browser.
*Things like Live Server are optional.
```
git clone https://github.com/Marfullsen/rot13-transcoder.git
cd rot13-transcoder
```
3. Enjoy!

---

## The encode/decode code

[![Screenshot](./TheZenOfMarfullsen.png)](https://Marfullsen.github.io/rot13-transcoder/)

```
let d = {};

function chr(numero){
return String.fromCharCode(numero);
}

for (const c of [65, 97]) {
for (var i=0; i<26; i++) {
d[chr(i+c)] = chr((i+13) % 26 + c)
}
}

function transcode(msg) {
resp = ''
for (letter of msg){
resp += d[letter]? d[letter] : ' ';
}
return resp;
}

console.log(d)
console.log(transcode('The Zen Of Marfullsen'))
```

## Visit the page:
[Marfullsen.github.io/rot13-transcoder](https://Marfullsen.github.io/rot13-transcoder/)

---

## Credit
This website is inspired by ["The Zen of Python"](https://www.python.org/dev/peps/pep-0020/).