0.0.3 • Published 2 years ago

titikoma-ed v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

TitikKoma Enc/Dec

📥 Instalation

# Using Npm
npm i titikoma-ed

# Using Yarn
yarn add titikoma-ed

:bulb: ProTip: You can install with the saved method installation by running npm install --save titikoma-ed or yarn global add titikoma-ed.

📍 Call The Module

const titikkoma = require("titikoma-ed");

🎯 Usage

//Basic
titikkoma.encrypt(code, type)

//Example
enc = titikkoma.encrypt("this is my code", "tked")
console.log(enc)

//Code Example Encrypt & Decrypt

//encrypt a string (Morse)
let morsenc = titikkoma.encrypt("Hello World", "morse");
console.log(morsenc);
//output: .... . .-.. .-.. --- / .-- --- .-. .-.. -..

//decrypt a string (Morse)
let morsdec = titikkoma.decrypt(".... . .-.. .-.. --- / .-- --- .-. .-.. -..", "morse");
console.log(morsdec);
//output: Hello World!

/*-----------------------------------*/

//encrypt a string (titikoma)
let tkenc = titikkoma.encrypt("Hello World", "tked");
console.log(tkenc)
//output: ,,.. ,,,. -,-, -,-, ,,-,, •/°° -.-,- ,,-,, ,,.,, -,-, .,-.,

//decrypt a string (titikoma)
let tkdec = titikkoma.decrypt(",,.. ,,,. -,-, -,-, ,,-,, •/°° -.-,- ,,-,, ,,.,, -,-, .,-.,", "tked");
console.log(tkdec)
//output: Hello World

⚙️ Type & Option

Type:

require("titikoma-ed").encrypt(code, type)

The Params type in code above is for type of the encrypt/decrypt code.

The available type for this params is tked: for TitikKoma code enc/dec and morse: for Morse code enc/dec.

Options:

const enc = require("titikoma-ed").encrypt(code, type);
const dec = require("titikoma-ed").decrypt(code, type);

The available option is encrypt for encoding the origin code and decrypt for decoding the encrypted code.

Big Thanks To SadesXd