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

https://github.com/obirikan/caesar-cipher-encoder-decoder

πŸ”This project implements a modular Caesar cipher for encoding and decoding English alphabetic messages. It's structured in a clean, maintainable folder-based architecture using Python functions and modules.
https://github.com/obirikan/caesar-cipher-encoder-decoder

cryptography

Last synced: 12 months ago
JSON representation

πŸ”This project implements a modular Caesar cipher for encoding and decoding English alphabetic messages. It's structured in a clean, maintainable folder-based architecture using Python functions and modules.

Awesome Lists containing this project

README

          

# πŸ” Modular Caesar Cipher

This project implements a **modular Caesar cipher** for encoding and decoding English alphabetic messages. It's structured in a clean, maintainable folder-based architecture using Python functions and modules.

---
## πŸ“ Architecture
![Caesar Cipher Diagram](assets/cc.png)

## πŸ“ Project Structure

```
CaesarCipherProject/
β”œβ”€β”€ cipher.py # Main runner script
β”œβ”€β”€ Variables/
β”‚ └── main.py # Contains shared constants (alphabets, delimiter)
β”œβ”€β”€ Tokenizer/
β”‚ └── main.py # Contains the Transfomer function
β”œβ”€β”€ encoder/
β”‚ └── encoder.py # Encoding logic
β”œβ”€β”€ decoder/
└── decoder.py # Decoding logic
```

---

## πŸš€ How It Works

### πŸ” `Transfomer(input_sentence)`

* Breaks sentence into individual characters
* Converts characters into index positions in the alphabet
* Passes characters to `Encode_Message()` and indices to `Decoded_Message()`

### πŸ” `Encode_Message(each_letter)`

* Shifts each letter back by 3 positions in the alphabet
* Returns the encoded message as a string

### πŸ”“ `Decoded_Message(word_index_in_alphabet)`

* Adjusts negative indices (replaces them with -1, which maps to 'z')
* Reconstructs the original sentence (note: 'z' used as space)

---

## πŸ’¬ Example

```python
input_sentence = 'we are going home today'

# Output:
Encoded Message: tb xob dlfkd eljb qlabv
Decoded Message: we are going home today
```

(Note: In this version, 'z' is temporarily used to indicate spaces)

---

## πŸ”§ Future Improvements (Phase 2+)

* Support upper/lower case properly
* Handle non-alphabetic characters
* Create CLI or GUI wrapper

---

## πŸ“¦ Requirements

* Python 3+

---

## βš–οΈ License

MIT License β€” free to use and modify.

---

## πŸ‘€ Author

* GitHub: obirikan

> "Encryption teaches us the power of shifting perspectiveβ€”literally and logically."