A TypeScript library for classical cryptography ciphers including Caesar, Vigenère, Substitution, and more.
npm install @jabez007/cryptotron.js> A JavaScript library implementing classic ciphers — Caesar, Vigenère, and more.
Cryptotron.js is an educational cryptography library for experimenting with historical ciphers.
It’s not intended for secure applications, but is perfect for learning and demos.
---
- 🏛️ Classical Ciphers
- Affine
- Autokey
- Beaufort
- Caesar
- Polybius Square
- Running Key
- Simple Substitution
- Vigenère
- More coming soon...
- 🔁 Symmetric encryption and decryption
- 📦 Lightweight and modular
- ✅ Includes unit tests
---
``bash`
npm install @jabez007/cryptotron.js
Or clone:
`bash`
git clone https://github.com/jabez007/cryptotron.js.git
---
`js
const { caesar, vigenere } = require("@jabez007/cryptotron.js");
// Caesar Cipher
console.log(caesar.encrypt({ shift: 3 })("HELLO")); // "KHOOR"
console.log(caesar.decrypt({ shift: 3 })("KHOOR")); // "HELLO"
// Vigenère Cipher
console.log(vigenere.encrypt({ keyword: "KEY" })("HELLO")); // "RIJVS"
console.log(vigenere.decrypt({ keyword: "KEY" })("RIJVS")); // "HELLO"
``
---
This library is for educational and demonstration purposes only.
Do not use it in production systems for secure communications.