0.0.2 • Published 3 years ago

encoderr v0.0.2

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

version GitHub license

Encoderr

Algorithms Available

Encoding

Algorith NameAlphabetParamreturnsRequires
Caesara...znumberstringnumber > 0
Vigenerea...zstringstringstring !Empty
Zigzaga...znumberstringnumber > 0
Mono Alphabeta...zalphastringalpha.length = Alphabet.length
Seriesa...znoneobjectnone
Row Transpositiona...zstringstringstring !Empty
Column Transpositiona...zstringstringstring !Empty

Decoding

Algorith NameAlphabetParamreturnsRequires
Caesara...znumberstringnumber > 0
Vigenerea...zstringstringstring !Empty
Zigzaga...znumberstringnumber > 0
Mono Alphabeta...zalphastringalpha.length = Alphabet.length
Seriesa...znonestringencode First
Row Transpositiona...zstringstringstring !Empty
Column Transpositiona...zstringstringstring !Empty

Example

import { encode, decode } from "encoderr";

let params = [
  "abcdefghijklmnñopqrstuvwxyz",
  "", // MESSAGE
  "2", // PARAM ACCORDING ENCODING/DECODING
];

const example = {
  encoding: ([alpha, text, moves]) => {
    moves = Number.parseInt(moves);
    if (!moves || moves < 1) return "Number Required";
    return encode.caesarEncode(alpha, text, moves);
  },
  decoding: ([alpha, text, moves]) => {
    moves = Number.parseInt(moves);
    if (!moves || moves < 1) return "Number Required";
    return encode.caesarEncode(alpha, text, moves);
  },
};

params[1] = "hello world";
console.log("message => ", params[1]);

params[1] = example.encoding(params);
console.log("encoded => ", params[1]);

params[1] = example.decoding(params);
console.log("decoded => ", params[1]);

Built With

javascript love

Authors

MelissaSanchez20karisZoecartoryGaboAPErick328milemf99

See also the list of contributors who participated in this project.

0.0.3

3 years ago

0.0.2

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago