44 encode(plainText:
string =
"", key:
string =
""):
string {
45 const cleanPT = this.sanitize(plainText);
46 const cleanKey = this.sanitize(key);
47 let fullKey = (cleanKey + cleanPT).slice(0, cleanPT.length);
50 for (let i = 0; i < cleanPT.length; i++) {
66 decode(cipherText:
string =
"", key:
string =
""):
string {
67 const cleanCT = this.sanitize(cipherText);
68 let fullKey = this.sanitize(key).split(
"");
71 for (
const ch of cleanCT) {