titikoma-ed
v0.0.3
Published
TitikKoma Encryptor/Decryptor : A modules for encode or decode string to a titikkoma/morse code.
Downloads
2
Maintainers
Readme
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 andmorse
: 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 anddecrypt
for decoding the encrypted code.