Fixed styling errors

This commit is contained in:
Matt C 2017-06-22 17:13:31 +01:00
parent 91c6f682e7
commit 246480daef
5 changed files with 12 additions and 12 deletions

View file

@ -1048,7 +1048,7 @@ const Utils = {
/** /**
* Actual modulo function, since % is actually the remainder function in JS. * Actual modulo function, since % is actually the remainder function in JS.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {number} x * @param {number} x
* @param {number} y * @param {number} y
* @returns {number} * @returns {number}
@ -1061,7 +1061,7 @@ const Utils = {
/** /**
* Finds the greatest common divisor of two numbers. * Finds the greatest common divisor of two numbers.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {number} x * @param {number} x
* @param {number} y * @param {number} y
* @returns {number} * @returns {number}
@ -1077,7 +1077,7 @@ const Utils = {
/** /**
* Finds the modular inverse of two values. * Finds the modular inverse of two values.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {number} x * @param {number} x
* @param {number} y * @param {number} y
* @returns {number} * @returns {number}

View file

@ -58,7 +58,7 @@ const ByteRepr = {
/** /**
* To Octal operation. * To Octal operation.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {byteArray} input * @param {byteArray} input
* @param {Object[]} args * @param {Object[]} args
* @returns {string} * @returns {string}
@ -72,7 +72,7 @@ const ByteRepr = {
/** /**
* From Octal operation. * From Octal operation.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {string} input * @param {string} input
* @param {Object[]} args * @param {Object[]} args
* @returns {byteArray} * @returns {byteArray}

View file

@ -596,12 +596,12 @@ const Cipher = {
/** /**
* Generates a polybius square for the given keyword * Generates a polybius square for the given keyword
* *
* @private
* @author Matt C [matt@artemisbot.uk] * @author Matt C [matt@artemisbot.uk]
* @param {string} input * @param {string} keyword
* @param {Object[]} args
* @returns {string} * @returns {string}
*/ */
genPolybiusSquare: function (keyword) { _genPolybiusSquare: function (keyword) {
const alpha = "ABCDEFGHIKLMNOPQRSTUVWXYZ"; const alpha = "ABCDEFGHIKLMNOPQRSTUVWXYZ";
let polybius = [], let polybius = [],
polString = ""; polString = "";
@ -634,7 +634,7 @@ const Cipher = {
trans; trans;
if (keyword.split("").unique().length > 25) return "The alphabet keyword must be less than 25 characters."; if (keyword.split("").unique().length > 25) return "The alphabet keyword must be less than 25 characters.";
if (!/^[a-zA-Z]+$/.test(keyword) && keyword.split("").unique().length > 0) return "The key must consist only of letters"; if (!/^[a-zA-Z]+$/.test(keyword) && keyword.split("").unique().length > 0) return "The key must consist only of letters";
const polybius = Cipher.genPolybiusSquare(keyword); const polybius = Cipher._genPolybiusSquare(keyword);
input.replace("J", "I").split("").forEach((letter) => { input.replace("J", "I").split("").forEach((letter) => {
let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0, let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0,
polInd; polInd;
@ -689,7 +689,7 @@ const Cipher = {
trans = ""; trans = "";
if (keyword.split("").unique().length > 25) return "The alphabet keyword must be less than 25 characters."; if (keyword.split("").unique().length > 25) return "The alphabet keyword must be less than 25 characters.";
if (!/^[a-zA-Z]+$/.test(keyword) && keyword.split("").unique().length > 0) return "The key must consist only of letters"; if (!/^[a-zA-Z]+$/.test(keyword) && keyword.split("").unique().length > 0) return "The key must consist only of letters";
const polybius = Cipher.genPolybiusSquare(keyword); const polybius = Cipher._genPolybiusSquare(keyword);
input.replace("J", "I").split("").forEach((letter) => { input.replace("J", "I").split("").forEach((letter) => {
let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0, let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0,
polInd; polInd;

View file

@ -135,7 +135,7 @@ const Rotate = {
/** /**
* ROT47 operation. * ROT47 operation.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @param {byteArray} input * @param {byteArray} input
* @param {Object[]} args * @param {Object[]} args
* @returns {byteArray} * @returns {byteArray}

View file

@ -1,7 +1,7 @@
/** /**
* ByteRepr tests. * ByteRepr tests.
* *
* @author Matt C [matt@artemisbot.pw] * @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */