mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-10 08:15:00 -04:00
spelling: necessary
This commit is contained in:
parent
14fd0f8fcf
commit
213c99e14b
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class VigenèreDecode extends Operation {
|
||||||
keyIndex = alphabet.indexOf(chr);
|
keyIndex = alphabet.indexOf(chr);
|
||||||
msgIndex = alphabet.indexOf(input[i]);
|
msgIndex = alphabet.indexOf(input[i]);
|
||||||
// Subtract indexes from each other, add 26 just in case the value is negative,
|
// 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];
|
output += alphabet[(msgIndex - keyIndex + alphabet.length) % 26];
|
||||||
} else if (alphabet.indexOf(input[i].toLowerCase()) >= 0) {
|
} else if (alphabet.indexOf(input[i].toLowerCase()) >= 0) {
|
||||||
chr = key[(i - fail) % key.length].toLowerCase();
|
chr = key[(i - fail) % key.length].toLowerCase();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue