Don't pad rail fence decode fixes #1069
This commit is contained in:
parent
c9d9730726
commit
2e0aa7ae87
@ -59,13 +59,6 @@ class RailFenceCipherDecode extends Operation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cycle = (key - 1) * 2;
|
const cycle = (key - 1) * 2;
|
||||||
|
|
||||||
const rest = cipher.length % key;
|
|
||||||
|
|
||||||
if (rest !== 0) {
|
|
||||||
cipher = cipher + (" ".repeat(key - rest));
|
|
||||||
}
|
|
||||||
|
|
||||||
const plaintext = new Array(cipher.length);
|
const plaintext = new Array(cipher.length);
|
||||||
|
|
||||||
let j = 0;
|
let j = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user