vigenere-x

1.0.1 • Public • Published

Vigenere X

A package to encrypt and decrypt messages using the Vigenere cipher with some extra features.

Its Centered on Vigenère cipher.

Example

Main Functions

Main functions are encode and decode to perform basic encryption / decryption.

var VigenereX = require("vigenere-x");

// for encoding
var cipher = VigenereX.encode("Hi, Its test/input text.", "MYKEY");
// returns => 'Tg, Sxq fccx/gznex rqvd.'

// for decoding
var plain = VigenereX.decode("Tg, Sxq fccx/gznex rqvd.", "MYKEY");
// returns  => 'Hi, Its test/input text.'

Other Functions

Other functions contains methods used under the hood like length of a string after beign validated or auto-repeating a key.


For auto repeating a key to same length as input string

var repeatedKey = VigenereX.Utils.equateKey(
  "lorem unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa",
  "autorepeat"
);
// returns => 'autorepeatautorepeat...autorepeatau'

For finding length of a given string after being validated, incase we want to use custom key

var textLength = VigenereX.Utils.textLength("Hi, Its test/input text.");
// returns  => 18

Package Sidebar

Install

npm i vigenere-x

Weekly Downloads

1

Version

1.0.1

License

GPL-3.0

Unpacked Size

11.9 kB

Total Files

7

Last publish

Collaborators

  • sadamumer3