Skip to content

Commit 2445600

Browse files
authored
Update keyFinder.js
Add some key words to the wordbank to increase the chance of the matching.
1 parent 75d7ef5 commit 2445600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ciphers/keyFinder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Find and retrieve the encryption key automatically
33
Note: This is a draft version, please help to modify, Thanks!
44
******************************************************/
55
function keyFinder(str){ // str is used to get the input of encrypted string
6-
const wordbank =[" the ","The "," of "," is ","Is "," am ","Am "," are ","Are "," have ","Have "," has ","Has "," may ","May "," be ","Be "];
6+
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 "];
77
//let wordbankelementCounter = 0;
88
//let key = 0; // return zero means the key can not be found
99
let inStr = str.toString(); //convert the input to String

0 commit comments

Comments
 (0)