/** * @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;