This project implements a Caesar Cipher encryption and decryption system with additional complexity. It adds alternating shift directions (forward and backward) for each letter and inserts random letters into the message to increase its complexity.
- Alternating letter shifts (forward and backward)
- Random letter insertion after every two characters to increase complexity
- Functions for both encryption and decryption of messages
- Reverses the added complexity during decryption to retrieve the original message
- JavaScript
The cipher shifts each letter of the message either forward or backward in the alphabet, alternating between the two directions for each letter. Every two letters in the message, a random letter is inserted to make the cipher harder to break. The decryption process reverses these steps to retrieve the original message.
- Each letter is alternately shifted forwards or backwards.
- After every two letters, a random letter is inserted to increase complexity.
- The process reverses the alternating shifts.
- Skips over every third letter (the random insertions during encryption).
Encryption:
- Input:
hello
- Output:
ifmmp
Decryption:
- Input:
ifmmp
- Output:
hello
To run this project:
- Clone the repository to your local machine.
- Run the
app.js
file in any JavaScript environment (Node.js recommended). - Use the provided functions to encrypt or decrypt a message.
app.js
: Contains the core logic for encrypting and decrypting messages.
This project is licensed under the MIT License.