File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ function keyFinder(){
10
10
var str = document . getElementById ( "encryptedID" ) . value ; //get the input string
11
11
var inStr = str . toString ( ) ; //convert the input to String
12
12
var outStr = "" ; // store the output value
13
- document . getElementById ( "debug" ) . innerHTML = shiftNum ;
13
+ document . getElementById ( "debug" ) . innerHTML = shiftNum ; // debug: display the shifted number(s)
14
14
for ( var i = 0 ; i < 26 ; i ++ ) {
15
15
outStr = caesarCipherEncodeAndDecodeEngine ( inStr , i ) ; // use the encrytpion engine to decrypt the input string, shiftNum=i
16
16
for ( var i = 0 ; i < wordbank . length ; i ++ ) {
17
17
if ( wordbank [ i ] == outStr [ i ] + outStr [ i + 1 ] {
18
- key = i ;
19
- }
18
+ key = i ;
19
+ }
20
20
}
21
- }
22
- return key ;
21
+ }
22
+ return key ;
23
23
}
You can’t perform that action at this time.
0 commit comments