This commit is contained in:
Josh Bloom 2025-04-23 04:33:31 +00:00 committed by GitHub
commit 53d92eb7eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -72,7 +72,7 @@ class RailFenceCipherDecode extends Operation {
}
}
return plaintext.join("").trim();
return plaintext.join("");
}
}

View file

@ -66,7 +66,7 @@ class RailFenceCipherEncode extends Operation {
rows[rowIdx] += plaintext[pos];
}
return rows.join("").trim();
return rows.join("");
}
}

View file

@ -528,4 +528,15 @@ TestRegister.addTests([
}
],
},
{
name: "Rail Fence Cipher Encode: Normal with Offset with Spaces",
input: "No one expects the spanish Inquisition.",
expectedOutput: " e n ut.ooeepcstesaihIqiiinNnxthpsnso",
recipeConfig: [
{
"op": "Rail Fence Cipher Encode",
"args": [3, 2]
}
],
},
]);