mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
tests added and XXTEA not working correctly fixed
This commit is contained in:
parent
653af6a300
commit
c14098a27c
2 changed files with 65 additions and 3 deletions
62
tests/operations/tests/XXTEA.mjs
Normal file
62
tests/operations/tests/XXTEA.mjs
Normal file
|
@ -0,0 +1,62 @@
|
|||
/**
|
||||
* Base64 tests.
|
||||
*
|
||||
* @author devcydo [devcydo@gmail.com]
|
||||
*
|
||||
* @copyright Crown Copyright 2022
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../lib/TestRegister.mjs";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "XXTEA",
|
||||
input: "Hello World! 你好,中国!",
|
||||
expectedOutput: "QncB1C0rHQoZ1eRiPM4dsZtRi9pNrp7sqvX76cFXvrrIHXL6",
|
||||
reecipeConfig: [
|
||||
{
|
||||
args: "1234567890"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "XXTEA",
|
||||
input: "ნუ პანიკას",
|
||||
expectedOutput: "PbWjnbFmP8Apu2MKOGNbjeW/72IZLlLMS/g82ozLxwE=",
|
||||
reecipeConfig: [
|
||||
{
|
||||
args: "1234567890"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "XXTEA",
|
||||
input: "ნუ პანიკას",
|
||||
expectedOutput: "dHrOJ4ClIx6gH33NPSafYR2GG7UqsazY6Xfb0iekBY4=",
|
||||
reecipeConfig: [
|
||||
{
|
||||
args: "ll3kj209d2"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "XXTEA",
|
||||
input: "",
|
||||
expectedOutput: "Invalid input length (0)",
|
||||
reecipeConfig: [
|
||||
{
|
||||
args: "1234567890"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "XXTEA",
|
||||
input: "",
|
||||
expectedOutput: "Invalid input length (0)",
|
||||
reecipeConfig: [
|
||||
{
|
||||
args: ""
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue