mirror of
https://github.com/gchq/CyberChef
synced 2024-11-15 09:07:06 +00:00
Added DateTime test, added filetime functions to Catagories, and removed unused variables.
This commit is contained in:
parent
ae38bb0927
commit
0c2c0d7b8b
4 changed files with 37 additions and 7 deletions
|
@ -192,6 +192,8 @@ const Categories = [
|
|||
"Translate DateTime Format",
|
||||
"From UNIX Timestamp",
|
||||
"To UNIX Timestamp",
|
||||
"From Windows Filetime To UNIX",
|
||||
"To Windows Filetime From UNIX",
|
||||
"Extract dates",
|
||||
]
|
||||
},
|
||||
|
|
|
@ -80,13 +80,6 @@ const DateTime = {
|
|||
},
|
||||
|
||||
|
||||
/**
|
||||
*@constant
|
||||
*@default
|
||||
*/
|
||||
RADIX: ["Decimal", "Hex"],
|
||||
|
||||
|
||||
/**
|
||||
* Converts a Windows FILETIME to Unix Epoch time.
|
||||
*
|
||||
|
|
|
@ -16,6 +16,7 @@ import "./tests/operations/ByteRepr.js";
|
|||
import "./tests/operations/CharEnc.js";
|
||||
import "./tests/operations/Code.js";
|
||||
import "./tests/operations/Compress.js";
|
||||
import "./tests/operations/DateTime.js";
|
||||
import "./tests/operations/FlowControl.js";
|
||||
import "./tests/operations/Image.js";
|
||||
import "./tests/operations/MorseCode.js";
|
||||
|
|
34
test/tests/operations/DateTime.js
Normal file
34
test/tests/operations/DateTime.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* DateTime tests.
|
||||
*
|
||||
* @author bwhitn [brian.m.whitney@outlook.com]
|
||||
*
|
||||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Filetime to Unix",
|
||||
input: "129207366395297693",
|
||||
expectedOutput: "1276263039529769300",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Windows Filetime to UNIX Timestamp",
|
||||
args: ["Nanoseconds (ns)"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Unix to Filetime",
|
||||
input: "1276263039529769300",
|
||||
expectedOutput: "129207366395297693",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "UNIX Timestamp to Windows Filetime",
|
||||
args: ["Nanoseconds (ns)"],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
Loading…
Reference in a new issue