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).
- Host: GitHub
- URL: https://github.com/marfullsen/rot13-transcoder
- Owner: Marfullsen
- Created: 2021-03-11T08:41:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-12T02:30:03.000Z (almost 5 years ago)
- Last Synced: 2025-01-10T05:36:30.081Z (about 1 year ago)
- Topics: caesar-cipher, encryption, foundation
- Language: CSS
- Homepage: https://marfullsen.github.io/rot13-transcoder/
- Size: 1.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rot13 Transcoder
[](https://get.foundation/)
[](https://www.javascript.com/)
[](https://Marfullsen.github.io/rot13-transcoder/)
[](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
[](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/).