classical-cipher

0.0.3 • Public • Published

classical-cipher

Tools for decrypting, encrypting, and solving classical ciphers in JavaScript

Licence

This project is licensed under the MIT license (MIT).

Features

Ciphers

  • Caesar shift
  • Simple substitution cipher
  • Vigenère cipher
  • Columnar transposition
  • Amsco cipher
  • Hill cipher
  • Railfence cipher

Statistics

  • Chi Squared

Solvers

  • Brute Force
  • Hill Climbing

Planned Features

  • Playfair cipher
  • Cadence cipher
  • Simulated Annealing
  • Quadram count
  • Bigram rate

Building

npm run-script build

Example

var cc = require("classical-cipher");
 
console.log(cc.solvers.bruteForce.solve({
    cipherText: "Alza zaypun!",
    cipher: cc.ciphers.caesarShift,
    stat: cc.stats.chiSquared,
    reporter: cc.reporters.silentReporter
}));// prints { text: 'Test string!', key: 7 }

/classical-cipher/

    Package Sidebar

    Install

    npm i classical-cipher

    Weekly Downloads

    3

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • thomashickman