Skip to content

Commit

Permalink
Don't pad rail fence decode fixes #1069
Browse files Browse the repository at this point in the history
  • Loading branch information
maqifrnswa committed Jul 16, 2020
1 parent c9d9730 commit 2e0aa7a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/operations/RailFenceCipherDecode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ class RailFenceCipherDecode extends Operation {
}

const cycle = (key - 1) * 2;

const rest = cipher.length % key;

if (rest !== 0) {
cipher = cipher + (" ".repeat(key - rest));
}

const plaintext = new Array(cipher.length);

let j = 0;
Expand Down

0 comments on commit 2e0aa7a

Please sign in to comment.