morphine-crypt

1.0.1 • Public • Published

morphine-crypt

Library for one-way encryption of words.

Example

// ENGLISH 
const MrphCrypt = require('./mrphcrypt');

MrphCrypt.crypt('Hello world', 'en')
.then(cryptedString => console.log(`Crypted string: ${cryptedString}`));

// Crypted string: Helles cowplop clockwork remolds

// RUSSIAN
MrphCrypt.crypt('Привет мир', 'ru')
.then(cryptedString => console.log(`Зашифрованная строка: ${cryptedString}`));

// Зашифрованная строка: Примаков советизирующий мирных

Argument scheme

MrphCrypt.crypt(String, 'en' | 'ru'));

How it works?

The word is split into tokens. A token is three letters of a word. Example. Word: Settings Tokens array: ['Set' 'tin', 'gs']

If the word is not divisible by 3 letters, then all the remaining letters will be the last element of the array.

After receiving the tokens, a search is made in the word base, the script searches for word matches with a separate token. And forms a sentence from these words.

Example

Amagansett abactinally administerings

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i morphine-crypt

      Weekly Downloads

      0

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      10.8 MB

      Total Files

      6

      Last publish

      Collaborators

      • itmor