1
0
mirror of synced 2024-11-17 19:47:12 +01:00
CyberChef/test/tests/operations/LengthValueDecoder.mjs
2018-08-27 15:42:07 +01:00

23 lines
663 B
JavaScript

/**
* Length Value Decoder tests.
*
* @author gchq77703 []
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import TestRegister from "../../TestRegister";
TestRegister.addTests([
{
name: "KeyValue",
input: [5,72,111,117,115,101,4,114,111,111,109,4,100,111,111,114],
expectedOutput: [{"key":[25],"length":5,"value":[72,111,117,115,101]},{"key":[73],"length":4,"value":[114,111,111,109]},{"key":[41],"length":4,"value":[100,111,111,114]}],
recipeConfig: [
{
"op": "Length Value Decoder",
"args": ["0 Bytes (No Key)", "1 Byte", false]
}
]
},
])