mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 08:46:19 -04:00
Add "To Base62" and "From Base62" operations
This commit is contained in:
parent
79b9b63982
commit
22454ae842
5 changed files with 188 additions and 0 deletions
|
@ -28,6 +28,7 @@ import "./tests/operations/BCD";
|
|||
import "./tests/operations/BSON";
|
||||
import "./tests/operations/Base58";
|
||||
import "./tests/operations/Base64";
|
||||
import "./tests/operations/Base62";
|
||||
import "./tests/operations/BitwiseOp";
|
||||
import "./tests/operations/ByteRepr";
|
||||
import "./tests/operations/CartesianProduct";
|
||||
|
|
79
test/tests/operations/Base62.mjs
Normal file
79
test/tests/operations/Base62.mjs
Normal file
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Base62 tests.
|
||||
*
|
||||
* @author tcode2k16 [tcode2k16@gmail.com]
|
||||
*
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "To Base62: nothing",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Base62: Hello, World!",
|
||||
input: "Hello, World!",
|
||||
expectedOutput: "1wJfrzvdbtXUOlUjUf",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Base62: UTF-8",
|
||||
input: "ნუ პანიკას",
|
||||
expectedOutput: "BPDNbjoGvDCDzHbKT77eWg0vGQrJuWRXltuRVZ",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Base62: nothing",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Base62: Hello, World!",
|
||||
input: "1wJfrzvdbtXUOlUjUf",
|
||||
expectedOutput: "Hello, World!",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Base62: UTF-8",
|
||||
input: "BPDNbjoGvDCDzHbKT77eWg0vGQrJuWRXltuRVZ",
|
||||
expectedOutput: "ნუ პანიკას",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Base62",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
}
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue