mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Converted Vignere, added more tests and cleaned stuff up
This commit is contained in:
parent
789ec94eff
commit
6bec68021c
7 changed files with 358 additions and 357 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2016
|
||||
* @author Matt C [matt@artemisbot.uk]
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
|
@ -48,11 +48,9 @@ class BifidCipherEncode extends Operation {
|
|||
let output = "",
|
||||
count = 0;
|
||||
|
||||
if (keyword.length > 25)
|
||||
return "The alphabet keyword must be less than 25 characters.";
|
||||
|
||||
if (!/^[a-zA-Z]+$/.test(keywordStr) && keyword.length > 0)
|
||||
return "The key must consist only of letters";
|
||||
if (!/^[A-Z]+$/.test(keywordStr) && keyword.length > 0)
|
||||
return "The key must consist only of letters in the English alphabet";
|
||||
|
||||
const polybius = genPolybiusSquare(keywordStr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue