From 2445600a5324a8b29efbb3356a51b703dea0f788 Mon Sep 17 00:00:00 2001 From: Wan Cheuk Lun Date: Wed, 31 Oct 2018 17:08:24 +0800 Subject: [PATCH] Update keyFinder.js Add some key words to the wordbank to increase the chance of the matching. --- Ciphers/keyFinder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ciphers/keyFinder.js b/Ciphers/keyFinder.js index 4186eae0a..f02171d49 100644 --- a/Ciphers/keyFinder.js +++ b/Ciphers/keyFinder.js @@ -3,7 +3,7 @@ Find and retrieve the encryption key automatically Note: This is a draft version, please help to modify, Thanks! ******************************************************/ function keyFinder(str){ // str is used to get the input of encrypted string - const wordbank =[" the ","The "," of "," is ","Is "," am ","Am "," are ","Are "," have ","Have "," has ","Has "," may ","May "," be ","Be "]; + const wordbank =["I ","You ","We ","They ","He ","She ","It "," the ","The "," of "," is ","Is "," am ","Am "," are ","Are "," have ","Have "," has ","Has "," may ","May "," be ","Be "]; //let wordbankelementCounter = 0; //let key = 0; // return zero means the key can not be found let inStr = str.toString(); //convert the input to String