mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
Remove trim from rail fence.
This commit is contained in:
@@ -72,7 +72,7 @@ class RailFenceCipherDecode extends Operation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return plaintext.join("").trim();
|
return plaintext.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class RailFenceCipherEncode extends Operation {
|
|||||||
rows[rowIdx] += plaintext[pos];
|
rows[rowIdx] += plaintext[pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
return rows.join("").trim();
|
return rows.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user