From 38c06e78b8c375b511e2f5fd7eddb07ebd3341ae Mon Sep 17 00:00:00 2001 From: Macide Celik Date: Sun, 27 Oct 2019 22:13:22 +0300 Subject: [PATCH] Delete ADD.mjs --- src/core/operations/ADD.mjs | 77 ------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/core/operations/ADD.mjs diff --git a/src/core/operations/ADD.mjs b/src/core/operations/ADD.mjs deleted file mode 100644 index 78580688..00000000 --- a/src/core/operations/ADD.mjs +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @author n1474335 [n1474335@gmail.com] - * @copyright Crown Copyright 2016 - * @license Apache-2.0 - */ - -import Operation from "../Operation.mjs"; -import Utils from "../Utils.mjs"; -import { bitOp, add, BITWISE_OP_DELIMS } from "../lib/BitwiseOp.mjs"; - -/** - * ADD operation - */ -class ADD extends Operation { - - /** - * ADD constructor - */ - constructor() { - super(); - - this.name = "ADD"; - this.module = "Default"; - this.description = "ADD the input with the given key (e.g. fe023da5), MOD 255"; - this.infoURL = "https://wikipedia.org/wiki/Bitwise_operation#Bitwise_operators"; - this.inputType = "byteArray"; - this.outputType = "byteArray"; - this.args = [ - { - "name": "Key", - "type": "toggleString", - "value": "", - "toggleValues": BITWISE_OP_DELIMS - } - ]; - } - - /** - * @param {byteArray} input - * @param {Object[]} args - * @returns {byteArray} - */ - run(input, args) { - const key = Utils.convertToByteArray(args[0].string || "", args[0].option); - - return bitOp(input, key, add); - } - - /** - * Highlight ADD - * - * @param {Object[]} pos - * @param {number} pos[].start - * @param {number} pos[].end - * @param {Object[]} args - * @returns {Object[]} pos - */ - highlight(pos, args) { - return pos; - } - - /** - * Highlight ADD in reverse - * - * @param {Object[]} pos - * @param {number} pos[].start - * @param {number} pos[].end - * @param {Object[]} args - * @returns {Object[]} pos - */ - highlightReverse(pos, args) { - return pos; - } - -} - -export default ADD;