ソースを参照

Fixed styling errors

Matt C 8 年 前
コミット
246480daef

+ 3 - 3
src/core/Utils.js

@@ -1048,7 +1048,7 @@ const Utils = {
     /**
      * 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} y
      * @returns {number}
@@ -1061,7 +1061,7 @@ const Utils = {
     /**
      * 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} y
      * @returns {number}
@@ -1077,7 +1077,7 @@ const Utils = {
     /**
      * Finds the modular inverse of two values.
      *
-     * @author Matt C [matt@artemisbot.pw]
+     * @author Matt C [matt@artemisbot.uk]
      * @param {number} x
      * @param {number} y
      * @returns {number}

+ 2 - 2
src/core/operations/ByteRepr.js

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

+ 5 - 5
src/core/operations/Cipher.js

@@ -596,12 +596,12 @@ const Cipher = {
     /**
      * Generates a polybius square for the given keyword
      *
+     * @private
      * @author Matt C [matt@artemisbot.uk]
-     * @param {string} input
-     * @param {Object[]} args
+     * @param {string} keyword
      * @returns {string}
      */
-    genPolybiusSquare: function (keyword) {
+    _genPolybiusSquare: function (keyword) {
         const alpha = "ABCDEFGHIKLMNOPQRSTUVWXYZ";
         let polybius = [],
             polString = "";
@@ -634,7 +634,7 @@ const Cipher = {
             trans;
         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";
-        const polybius = Cipher.genPolybiusSquare(keyword);
+        const polybius = Cipher._genPolybiusSquare(keyword);
         input.replace("J", "I").split("").forEach((letter) => {
             let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0,
                 polInd;
@@ -689,7 +689,7 @@ const Cipher = {
             trans = "";
         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";
-        const polybius = Cipher.genPolybiusSquare(keyword);
+        const polybius = Cipher._genPolybiusSquare(keyword);
         input.replace("J", "I").split("").forEach((letter) => {
             let alpInd = alpha.split("").indexOf(letter.toLocaleUpperCase()) >= 0,
                 polInd;

+ 1 - 1
src/core/operations/Rotate.js

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

+ 1 - 1
test/tests/operations/ByteRepr.js

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