mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-10 00:05:11 -04:00
Update MultiTapCipherEncode.mjs
Fixed a bug on line 58
This commit is contained in:
parent
9c462418e9
commit
431e8494fc
1 changed files with 2 additions and 2 deletions
|
@ -52,10 +52,10 @@ class MultiTapCipherEncode extends Operation {
|
||||||
if(emap[plaintext.charAt(i)] == undefined)
|
if(emap[plaintext.charAt(i)] == undefined)
|
||||||
throw new OperationError("The input must be only alphabets");
|
throw new OperationError("The input must be only alphabets");
|
||||||
ciphertext += emap[plaintext.charAt(i)];
|
ciphertext += emap[plaintext.charAt(i)];
|
||||||
if(i!=plaintext.length)
|
if(i!=plaintext.length-1)
|
||||||
ciphertext += delim;
|
ciphertext += delim;
|
||||||
}
|
}
|
||||||
return ciphertext.substring(0,ciphertext.length-1);
|
return ciphertext.substring(0,ciphertext.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue