Question: Modify the following program so that the user can specify an encryption key other than 3 with a - k option. For example: java CaeserCipher
Modify the following program so that the user can specify an encryption key other than with a option. For example:
java CaeserCipher k input.txt output.txt
tableinfiletxtinfiletxt
import java.ioFile;
import java.ioFileNotFoundException;
import java.ioPrintWriter;
import java.util.Scanner;
This program encrypts a file using the Caesar cipher.
public class CaesarCipher
public static void mainString args throws FileNotFoundException
String myargs new String;
Scanner console new ScannerSystem in;
myargs console. next ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
