Implement Affine Cipher Java Program Able Encryption Decryption Lowercase Characters Z Enc Q37300607

Implement Affine cipher In java.

The program should be able to do both encryption and decryption.Lowercase characters a

-z will be

encrypted/decrypted to lowercase characters. Uppercasecharacters A-Z will be encrypted/decrypted to uppercase characters.Other characters not in the range (a-z, A-Z) will be unchanged. Theprogram should accept the following parameters: a flag to indicateencryption or decryption, asecret key, an input file name, and anoutput file name. For example:

myProgram -key 3 8 -encrypt -in file1.txt -out file2.txt

myProgram -key 3 8 -decrypt -in file2.txt -out file3.txt

The program should be able to detect invalid key and display anerror message if it encounters an invalid key.


Answer


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.