js-ktc

Javascript Keyword Transposition Cipher

  • js-ktc

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
js-ktc
301.1.103 months ago5 years agoMinified + gzip package size for js-ktc in KB

Readme

Javascript Keyword Transposition Cipher
Node.js Package CodeQL contributions welcome
An implementation of a basic keyword transposition cipher in Javascript with zero dependencies.
const C = require('js-ktc');
let ktc = new C('secret')

ktc.encrypt('CRYPTOLOGY')
// 'JHQSU XFXBQ '

ktc.decrypt('JHQSU XFXBQ')
// 'CRYPT OLOGY '

✅ Easy to use
✅ Extensible
✅ Test coverage
✅ Lots of comments (good for education)
✅ No bloat (zero dependencies)
✅ MIT license

Installation

npm install js-ktc

Usage

  • Require const C = require('js-ktc');
  • Initialize let ktc = new C('secret')
  • Encrypt ktc.encrypt('CRYPTOLOGY')
  • Decrypt ktc.decrypt('JHQSU XFXBQ')

Limitations

The basic implementation only works with A-Z though it can easily be extended to support other characters.

Development

---
See the CONTRIBUTING.md file for instructions on how to contribute to this project.