diff --git a/Gruntfile.js b/Gruntfile.js
index 92a2d550..42083e26 100755
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -355,7 +355,7 @@ module.exports = function (grunt) {
},
setupNodeConsumers: {
command: [
- "echo '\n--- Testing node conumers ---'",
+ "echo '\n--- Testing node consumers ---'",
"npm link",
`mkdir ${nodeConsumerTestPath}`,
`cp tests/node/consumers/* ${nodeConsumerTestPath}`,
diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs
index 64bdf3fb..1d592cbd 100755
--- a/src/core/Dish.mjs
+++ b/src/core/Dish.mjs
@@ -129,7 +129,7 @@ class Dish {
*
* @param {number} type - The data type of value, see Dish enums.
* @param {boolean} [notUTF8=false] - Do not treat strings as UTF8.
- * @returns {* | Promise} - (Broswer) A promise | (Node) value of dish in given type
+ * @returns {* | Promise} - (Browser) A promise | (Node) value of dish in given type
*/
get(type, notUTF8=false) {
if (typeof type === "string") {
@@ -191,7 +191,7 @@ class Dish {
*
* @param {number} type - The data type of value, see Dish enums.
* @param {boolean} [notUTF8=false] - Do not treat strings as UTF8.
- * @returns {Dish | Promise} - (Broswer) A promise | (Node) value of dish in given type
+ * @returns {Dish | Promise} - (Browser) A promise | (Node) value of dish in given type
*/
presentAs(type, notUTF8=false) {
const clone = this.clone();
diff --git a/src/core/lib/BCD.mjs b/src/core/lib/BCD.mjs
index 623a90c7..2f245236 100644
--- a/src/core/lib/BCD.mjs
+++ b/src/core/lib/BCD.mjs
@@ -22,7 +22,7 @@ export const ENCODING_SCHEME = [
/**
* Lookup table for the binary value of each digit representation.
*
- * I wrote a very nice algorithm to generate 8 4 2 1 encoding programatically,
+ * I wrote a very nice algorithm to generate 8 4 2 1 encoding programmatically,
* but unfortunately it's much easier (if less elegant) to use lookup tables
* when supporting multiple encoding schemes.
*
diff --git a/src/core/lib/Delim.mjs b/src/core/lib/Delim.mjs
index 0a7193c6..c8cc637b 100644
--- a/src/core/lib/Delim.mjs
+++ b/src/core/lib/Delim.mjs
@@ -32,7 +32,7 @@ export const WORD_DELIM_OPTIONS = ["Line feed", "CRLF", "Forward slash", "Backsl
export const INPUT_DELIM_OPTIONS = ["Line feed", "CRLF", "Space", "Comma", "Semi-colon", "Colon", "Nothing (separate chars)"];
/**
- * Armithmetic sequence delimiters
+ * Arithmetic sequence delimiters
*/
export const ARITHMETIC_DELIM_OPTIONS = ["Line feed", "Space", "Comma", "Semi-colon", "Colon", "CRLF"];
diff --git a/src/core/lib/FileSignatures.mjs b/src/core/lib/FileSignatures.mjs
index 40eacff4..a6efb320 100644
--- a/src/core/lib/FileSignatures.mjs
+++ b/src/core/lib/FileSignatures.mjs
@@ -2463,7 +2463,7 @@ export function extractMZPE(bytes, offset) {
const numSections = stream.readInt(2, "le");
// Read Optional Header Magic to determine the state of the image file
- // 0x10b = normal exeuctable, 0x107 = ROM image, 0x20b = PE32+ executable
+ // 0x10b = normal executable, 0x107 = ROM image, 0x20b = PE32+ executable
stream.moveForwardsBy(16);
const optionalMagic = stream.readInt(2, "le");
const pe32Plus = optionalMagic === 0x20b;
diff --git a/src/core/lib/FileType.mjs b/src/core/lib/FileType.mjs
index dc6cc973..291760d7 100644
--- a/src/core/lib/FileType.mjs
+++ b/src/core/lib/FileType.mjs
@@ -178,7 +178,7 @@ export function scanForFileTypes(buf, categories=Object.keys(FILE_SIGNATURES)) {
* @param {Uint8Array} buf - The buffer to search
* @param {Object} sig - A single signature object (Not an array of signatures)
* @param {number} offset - Where to start search from
- * @returs {number} The position of the match or -1 if one cannot be found.
+ * @returns {number} The position of the match or -1 if one cannot be found.
*/
function locatePotentialSig(buf, sig, offset) {
// Find values for first key and value in sig
diff --git a/src/core/lib/QRCode.mjs b/src/core/lib/QRCode.mjs
index 1585cb41..041c21f7 100644
--- a/src/core/lib/QRCode.mjs
+++ b/src/core/lib/QRCode.mjs
@@ -37,7 +37,7 @@ export async function parseQrCode(input, normalise) {
image = await jimp.read(image);
}
} catch (err) {
- throw new OperationError(`Error normalising iamge. (${err})`);
+ throw new OperationError(`Error normalising image. (${err})`);
}
const qrData = jsQR(image.bitmap.data, image.getWidth(), image.getHeight());
diff --git a/src/core/operations/BLAKE2b.mjs b/src/core/operations/BLAKE2b.mjs
index 113cbaf3..6218f7f0 100644
--- a/src/core/operations/BLAKE2b.mjs
+++ b/src/core/operations/BLAKE2b.mjs
@@ -50,7 +50,7 @@ class BLAKE2b extends Operation {
/**
* @param {ArrayBuffer} input
* @param {Object[]} args
- * @returns {string} The input having been hashed with BLAKE2b in the encoding format speicifed.
+ * @returns {string} The input having been hashed with BLAKE2b in the encoding format specified.
*/
run(input, args) {
const [outSize, outFormat] = args;
diff --git a/src/core/operations/BLAKE2s.mjs b/src/core/operations/BLAKE2s.mjs
index 36015607..8f84e041 100644
--- a/src/core/operations/BLAKE2s.mjs
+++ b/src/core/operations/BLAKE2s.mjs
@@ -51,7 +51,7 @@ class BLAKE2s extends Operation {
/**
* @param {ArrayBuffer} input
* @param {Object[]} args
- * @returns {string} The input having been hashed with BLAKE2s in the encoding format speicifed.
+ * @returns {string} The input having been hashed with BLAKE2s in the encoding format specified.
*/
run(input, args) {
const [outSize, outFormat] = args;
diff --git a/src/core/operations/HammingDistance.mjs b/src/core/operations/HammingDistance.mjs
index fb60f940..60121a75 100644
--- a/src/core/operations/HammingDistance.mjs
+++ b/src/core/operations/HammingDistance.mjs
@@ -57,7 +57,7 @@ class HammingDistance extends Operation {
samples = input.split(delim);
if (samples.length !== 2) {
- throw new OperationError("Error: You can only calculae the edit distance between 2 strings. Please ensure exactly two inputs are provided, separated by the specified delimiter.");
+ throw new OperationError("Error: You can only calculate the edit distance between 2 strings. Please ensure exactly two inputs are provided, separated by the specified delimiter.");
}
if (samples[0].length !== samples[1].length) {
diff --git a/src/core/operations/RawInflate.mjs b/src/core/operations/RawInflate.mjs
index d676ff1e..f8a938c5 100644
--- a/src/core/operations/RawInflate.mjs
+++ b/src/core/operations/RawInflate.mjs
@@ -77,7 +77,7 @@ class RawInflate extends Operation {
}),
result = new Uint8Array(inflate.decompress());
- // Raw Inflate somethimes messes up and returns nonsense like this:
+ // Raw Inflate sometimes messes up and returns nonsense like this:
// ]....]....]....]....]....]....]....]....]....]....]....]....]....]...
// e.g. Input data of [8b, 1d, dc, 44]
// Look for the first two square brackets:
diff --git a/src/core/operations/RemoveWhitespace.mjs b/src/core/operations/RemoveWhitespace.mjs
index a9ceda81..0689f766 100644
--- a/src/core/operations/RemoveWhitespace.mjs
+++ b/src/core/operations/RemoveWhitespace.mjs
@@ -64,7 +64,7 @@ class RemoveWhitespace extends Operation {
run(input, args) {
const [
removeSpaces,
- removeCariageReturns,
+ removeCarriageReturns,
removeLineFeeds,
removeTabs,
removeFormFeeds,
@@ -73,7 +73,7 @@ class RemoveWhitespace extends Operation {
let data = input;
if (removeSpaces) data = data.replace(/ /g, "");
- if (removeCariageReturns) data = data.replace(/\r/g, "");
+ if (removeCarriageReturns) data = data.replace(/\r/g, "");
if (removeLineFeeds) data = data.replace(/\n/g, "");
if (removeTabs) data = data.replace(/\t/g, "");
if (removeFormFeeds) data = data.replace(/\f/g, "");
diff --git a/src/core/operations/ToQuotedPrintable.mjs b/src/core/operations/ToQuotedPrintable.mjs
index e26f3c67..9db5c5a5 100644
--- a/src/core/operations/ToQuotedPrintable.mjs
+++ b/src/core/operations/ToQuotedPrintable.mjs
@@ -108,7 +108,7 @@ class ToQuotedPrintable extends Operation {
* @private
* @param {number} nr
* @param {byteArray[]} ranges
- * @returns {bolean}
+ * @returns {boolean}
*/
_checkRanges(nr, ranges) {
for (let i = ranges.length - 1; i >= 0; i--) {
diff --git a/src/core/operations/Typex.mjs b/src/core/operations/Typex.mjs
index a9b7a3d0..8b81c13f 100644
--- a/src/core/operations/Typex.mjs
+++ b/src/core/operations/Typex.mjs
@@ -23,7 +23,7 @@ class Typex extends Operation {
this.name = "Typex";
this.module = "Default";
- this.description = "Encipher/decipher with the WW2 Typex machine.
Typex was originally built by the British Royal Air Force prior to WW2, and is based on the Enigma machine with some improvements made, including using five rotors with more stepping points and interchangeable wiring cores. It was used across the British and Commonewealth militaries. A number of later variants were produced; here we simulate a WW2 era Mark 22 Typex with plugboards for the reflector and input. Typex rotors were changed regularly and none are public: a random example set are provided.
To configure the reflector plugboard, enter a string of connected pairs of letters in the reflector box, e.g. AB CD EF
connects A to B, C to D, and E to F (you'll need to connect every letter). There is also an input plugboard: unlike Enigma's plugboard, it's not restricted to pairs, so it's entered like a rotor (without stepping). To create your own rotor, enter the letters that the rotor maps A to Z to, in order, optionally followed by <
then a list of stepping points.
More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.";
+ this.description = "Encipher/decipher with the WW2 Typex machine.
Typex was originally built by the British Royal Air Force prior to WW2, and is based on the Enigma machine with some improvements made, including using five rotors with more stepping points and interchangeable wiring cores. It was used across the British and Commonwealth militaries. A number of later variants were produced; here we simulate a WW2 era Mark 22 Typex with plugboards for the reflector and input. Typex rotors were changed regularly and none are public: a random example set are provided.
To configure the reflector plugboard, enter a string of connected pairs of letters in the reflector box, e.g. AB CD EF
connects A to B, C to D, and E to F (you'll need to connect every letter). There is also an input plugboard: unlike Enigma's plugboard, it's not restricted to pairs, so it's entered like a rotor (without stepping). To create your own rotor, enter the letters that the rotor maps A to Z to, in order, optionally followed by <
then a list of stepping points.
More detailed descriptions of the Enigma, Typex and Bombe operations can be found here.";
this.infoURL = "https://wikipedia.org/wiki/Typex";
this.inputType = "string";
this.outputType = "string";
diff --git a/src/core/operations/UNIXTimestampToWindowsFiletime.mjs b/src/core/operations/UNIXTimestampToWindowsFiletime.mjs
index 5a042885..c87f3507 100644
--- a/src/core/operations/UNIXTimestampToWindowsFiletime.mjs
+++ b/src/core/operations/UNIXTimestampToWindowsFiletime.mjs
@@ -56,7 +56,7 @@ class UNIXTimestampToWindowsFiletime extends Operation {
} else if (units === "Milliseconds (ms)") {
input = input.multipliedBy(new BigNumber("10000"));
} else if (units === "Microseconds (μs)") {
- input = input.multiplyiedBy(new BigNumber("10"));
+ input = input.multipliedBy(new BigNumber("10"));
} else if (units === "Nanoseconds (ns)") {
input = input.dividedBy(new BigNumber("100"));
} else {
diff --git a/src/core/operations/URLEncode.mjs b/src/core/operations/URLEncode.mjs
index f819ee2e..a5efd213 100644
--- a/src/core/operations/URLEncode.mjs
+++ b/src/core/operations/URLEncode.mjs
@@ -49,7 +49,7 @@ class URLEncode extends Operation {
* @returns {string}
*/
encodeAllChars (str) {
- // TODO Do this programatically
+ // TODO Do this programmatically
return encodeURIComponent(str)
.replace(/!/g, "%21")
.replace(/#/g, "%23")
diff --git a/src/core/operations/VigenèreDecode.mjs b/src/core/operations/VigenèreDecode.mjs
index 90cca3f8..8abaeed8 100644
--- a/src/core/operations/VigenèreDecode.mjs
+++ b/src/core/operations/VigenèreDecode.mjs
@@ -55,7 +55,7 @@ class VigenèreDecode extends Operation {
keyIndex = alphabet.indexOf(chr);
msgIndex = alphabet.indexOf(input[i]);
// Subtract indexes from each other, add 26 just in case the value is negative,
- // modulo to remove if neccessary
+ // modulo to remove if necessary
output += alphabet[(msgIndex - keyIndex + alphabet.length) % 26];
} else if (alphabet.indexOf(input[i].toLowerCase()) >= 0) {
chr = key[(i - fail) % key.length].toLowerCase();
diff --git a/src/core/operations/Whirlpool.mjs b/src/core/operations/Whirlpool.mjs
index 0e1c51ab..ae4c0359 100644
--- a/src/core/operations/Whirlpool.mjs
+++ b/src/core/operations/Whirlpool.mjs
@@ -20,7 +20,7 @@ class Whirlpool extends Operation {
this.name = "Whirlpool";
this.module = "Crypto";
- this.description = "Whirlpool is a cryptographic hash function designed by Vincent Rijmen (co-creator of AES) and Paulo S. L. M. Barreto, who first described it in 2000.
Several variants exist: