Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.4 KB

File metadata and controls

58 lines (36 loc) · 1.4 KB

🔐 Cipher — Caesar Cipher Decryption Tool

A simple JavaScript program that decodes a Caesar‑shifted string. This project takes an encoded message and shifts each letter backward through the alphabet to reveal the original text. Built as part of the freeCodeCamp JavaScript Algorithms and Data Structures curriculum.

✨ Features

  • Fully decrypts Caesar‑encoded text

  • Preserves spaces and punctuation

  • Handles uppercase and lowercase letters

  • Uses modular arithmetic to wrap around the alphabet

  • Runs in the browser or via Node.js

🧠 How Decryption Works

The Caesar Cipher encodes text by shifting letters forward. Your program reverses that shift:

  • Encoded: "GHI"

  • Shift: 2

  • Output: "EFG"

Your script loops through each character, checks if it’s a letter, shifts it backward, and reconstructs the decoded message.

🛠️ Technologies Used

  • JavaScript (ES6)

  • Node.js (optional for running locally)

  • HTML/CSS (if you add a UI later)

▶️ How to Run Locally

Clone the repository:

Code git clone https://github.com/Romie321/Cipher.git Navigate into the project folder:

Code cd Cipher Run the script with Node:

Code node script.js

🌐 Live Demo

👉 Live Site: https://romie321.github.io/Cipher/

🚀 Future Improvements

  • Add a simple UI for entering encoded text

  • Add an “encrypt” mode

  • Add support for non‑Latin alphabets

  • Add animations or visual feedback