mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Initial operation setup
This commit is contained in:
parent
d148cae814
commit
550ab403f6
2 changed files with 57 additions and 0 deletions
|
@ -316,6 +316,7 @@
|
||||||
"Fletcher-32 Checksum",
|
"Fletcher-32 Checksum",
|
||||||
"Fletcher-64 Checksum",
|
"Fletcher-64 Checksum",
|
||||||
"Adler-32 Checksum",
|
"Adler-32 Checksum",
|
||||||
|
"CRC-8 Checksum",
|
||||||
"CRC-16 Checksum",
|
"CRC-16 Checksum",
|
||||||
"CRC-32 Checksum",
|
"CRC-32 Checksum",
|
||||||
"TCP/IP Checksum"
|
"TCP/IP Checksum"
|
||||||
|
|
56
src/core/operations/CRC8Checksum.mjs
Normal file
56
src/core/operations/CRC8Checksum.mjs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/**
|
||||||
|
* @author mshwed [m@ttshwed.com]
|
||||||
|
* @copyright Crown Copyright 2019
|
||||||
|
* @license Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Operation from "../Operation";
|
||||||
|
import OperationError from "../errors/OperationError";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CRC-8 Checksum operation
|
||||||
|
*/
|
||||||
|
class CRC8Checksum extends Operation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CRC8Checksum constructor
|
||||||
|
*/
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.name = "CRC-8 Checksum";
|
||||||
|
this.module = "Crypto";
|
||||||
|
this.description = "";
|
||||||
|
this.infoURL = "";
|
||||||
|
this.inputType = "ArrayBuffer";
|
||||||
|
this.outputType = "string";
|
||||||
|
this.args = [
|
||||||
|
/* Example arguments. See the project wiki for full details.
|
||||||
|
{
|
||||||
|
name: "First arg",
|
||||||
|
type: "string",
|
||||||
|
value: "Don't Panic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Second arg",
|
||||||
|
type: "number",
|
||||||
|
value: 42
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {byteArray} input
|
||||||
|
* @param {Object[]} args
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
run(input, args) {
|
||||||
|
// const [firstArg, secondArg] = args;
|
||||||
|
|
||||||
|
throw new OperationError("Test");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CRC8Checksum;
|
Loading…
Add table
Add a link
Reference in a new issue