mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-25 01:06:16 -04:00
Merge branch 'NewCiphers' of https://github.com/n1073645/CyberChef into n1073645-NewCiphers
This commit is contained in:
commit
5e7b004925
6 changed files with 202 additions and 0 deletions
|
@ -98,6 +98,7 @@ import "./tests/ParseUDP.mjs";
|
|||
import "./tests/AvroToJSON.mjs";
|
||||
import "./tests/Lorenz.mjs";
|
||||
import "./tests/LuhnChecksum.mjs";
|
||||
import "./tests/CipherSaber2.mjs";
|
||||
|
||||
|
||||
// Cannot test operations that use the File type yet
|
||||
|
|
45
tests/operations/tests/CipherSaber2.mjs
Normal file
45
tests/operations/tests/CipherSaber2.mjs
Normal file
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* Ciphersaber2 tests.
|
||||
*
|
||||
* @author n1073645 [n1073645@gmail.com]
|
||||
*
|
||||
* @copyright Crown Copyright 2020
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../lib/TestRegister.mjs";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "CipherSaber2 Encrypt",
|
||||
input: "Hello World",
|
||||
expectedMatch: /.{21}/s,
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "CipherSaber2 Encrypt",
|
||||
args: ["test", 20],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "CipherSaber2 Decrypt",
|
||||
input: "\x5d\xd9\x7f\xeb\x77\x3c\x42\x9d\xfe\x9c\x3b\x21\x63\xbd\x53\x38\x18\x7c\x36\x37",
|
||||
expectedOutput: "helloworld",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "CipherSaber2 Decrypt",
|
||||
args: ["test", 20],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "CipherSaber2 Encrypt",
|
||||
input: "",
|
||||
expectedMatch: /.{10}/s,
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "CipherSaber2 Encrypt",
|
||||
args: ["", 20],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue