mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 09:16:17 -04:00
Fix Base58 handling of strings with only null characters
This commit is contained in:
parent
866c9a94ae
commit
4c6200f233
3 changed files with 28 additions and 10 deletions
|
@ -53,6 +53,28 @@ TestRegister.addTests([
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Base58 all null",
|
||||
input: "\0\0\0\0\0\0",
|
||||
expectedOutput: "111111",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Base58",
|
||||
args: ["123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Base58 all null",
|
||||
input: "111111",
|
||||
expectedOutput: "\0\0\0\0\0\0",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Base58",
|
||||
args: ["123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Base58 with null prefix and suffix",
|
||||
input: "\0\0\0Hello\0\0\0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue