Skip to content

Odunsih1/henry_cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Custom Atbash-Inspired Cipher (JavaScript)

This project is a simple implementation of a custom text cipher built in vanilla JavaScript. It’s loosely inspired by the classic Atbash cipher, but with a personalized twist.


✨ Features

  • Encrypts lowercase letters using reversed halves of the alphabet:
    • a–m → reversed as m–a
    • n–z → reversed as z–n
  • Leaves non-alphabet characters (spaces, punctuation, numbers) unchanged
  • Minimal logic, beginner-friendly, no external libraries
  • Console-based interaction using prompt() and console.log()

🧠 How It Works

  1. You enter a message via a prompt.
  2. Each character is checked:
    • If it's in the first half of the alphabet (a–m), it's replaced by its mirror in that half.
    • If it's in the second half (n–z), it's replaced by its mirror in that half.
    • Any other character (space, punctuation, etc.) is preserved.
  3. The result is printed to the console.

🧪 Example

Input: Hello, World! Output: svool, dliow!


🚀 Usage

  1. Clone the repo or copy the code from script.js
  2. Open the file in your browser or use a live JavaScript environment
  3. You’ll be prompted to enter a message
  4. The encrypted message will be logged in the console

📌 Possible Improvements

  • Add decryption (this cipher is symmetric)
  • Support uppercase letters
  • Build a UI for web-based encryption
  • Host as a playground on Vercel or Netlify
  • Turn it into a mini NPM package

🤝 Contributing

Pull requests and suggestions are welcome!
If you have ideas for improving or extending this cipher, feel free to open an issue or submit a PR.


🛡 License

This project is licensed under the MIT License.


👋 Author

Henry Odunsi
Frontend Developer | Builder | Problem Solver
LinkedInPortfolio


About

This project is a simple implementation of a custom text cipher built in vanilla JavaScript. It’s loosely inspired by the classic Atbash cipher, but with a personalized twist.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors