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(){
1010 var str = document . getElementById ( "encryptedID" ) . value ; //get the input string
1111 var inStr = str . toString ( ) ; //convert the input to String
1212 var outStr = "" ; // store the output value
13- document . getElementById ( "debug" ) . innerHTML = shiftNum ;
13+ document . getElementById ( "debug" ) . innerHTML = shiftNum ; // debug: display the shifted number(s)
1414 for ( var i = 0 ; i < 26 ; i ++ ) {
1515 outStr = caesarCipherEncodeAndDecodeEngine ( inStr , i ) ; // use the encrytpion engine to decrypt the input string, shiftNum=i
1616 for ( var i = 0 ; i < wordbank . length ; i ++ ) {
1717 if ( wordbank [ i ] == outStr [ i ] + outStr [ i + 1 ] {
18- key = i ;
19- }
18+ key = i ;
19+ }
2020 }
21- }
22- return key ;
21+ }
22+ return key ;
2323}
You can’t perform that action at this time.
0 commit comments