mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Fixed styling errors
This commit is contained in:
parent
91c6f682e7
commit
246480daef
5 changed files with 12 additions and 12 deletions
|
@ -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}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue