CRC Checksum operations now send their input as ArrayBuffers. Tests added. Fixes #293

This commit is contained in:
n1474335 2018-04-29 21:44:54 +01:00
parent cb66508b8a
commit f81012ef6e
4 changed files with 125 additions and 4 deletions

View file

@ -3304,14 +3304,14 @@ const OperationConfig = {
"CRC-32 Checksum": {
module: "Hashing",
description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961; the 32-bit CRC function of Ethernet and many other standards is the work of several researchers and was published in 1975.",
inputType: "string",
inputType: "ArrayBuffer",
outputType: "string",
args: []
},
"CRC-16 Checksum": {
module: "Hashing",
description: "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961.",
inputType: "string",
inputType: "ArrayBuffer",
outputType: "string",
args: []
},

View file

@ -120,7 +120,7 @@ const Checksum = {
/**
* CRC-32 Checksum operation.
*
* @param {string} input
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {string}
*/
@ -132,7 +132,7 @@ const Checksum = {
/**
* CRC-16 Checksum operation.
*
* @param {string} input
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {string}
*/