File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,19 @@ public static void main(String[] args){
40
40
41
41
}else if (option == 2 ){
42
42
System .out .println ("Enter the message to Decrypt : " );
43
+ String message = myConsole .readLine (BLUE +"encryptedMessage" +GREEN +"@caesar:" +BLUE +"~$ " +NEUTRAL );
44
+ System .out .println ("\n Enter the shift key '1 - 25' :" );
45
+ int key = Integer .parseInt (myConsole .readLine (BLUE +"key" +GREEN +"@caesar:" +BLUE +"~$ " +NEUTRAL ));
46
+ myCaesar .setKey (key );
47
+ myCaesar .decrypt (message );
48
+ System .out .println (RED +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" +NEUTRAL );
49
+ System .out .println (BLUE +"Input String: " +GREEN +message );
50
+ System .out .println (BLUE +"Decrypted String: " +GREEN +myCaesar .getDecryptedMsg ());
51
+ System .out .println (BLUE +"Shift/Decryption key : " +GREEN +myCaesar .getKey ()+NEUTRAL );
52
+ System .out .println (RED +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" +NEUTRAL );
43
53
44
54
}else if (option == 3 ){
45
- System .out .println ("Goodbye :)" );
55
+ System .out .println (RED + "Goodbye :)" );
46
56
running = false ;
47
57
}else {
48
58
System .out .println (RED +"Oops!, invalid Option :(" +NEUTRAL );
You can’t perform that action at this time.
0 commit comments