Question: 5 . Create an EncryptionMethod interface as outlined above. 6 . Refactor the CaesarCipher and XORCipher classes to inherit from the EncryptionMethod interface. 7 .

5. Create an EncryptionMethod interface as outlined above.
6. Refactor the CaesarCipher and XORCipher classes to inherit from the EncryptionMethod interface.
7. Implement an Encryption class that has an encryptFile() and decryptFile() method. Each method should take an input Path, output Path and an EncryptionMethod argument.
8. Create appropriate tests for the CaesarCipher, XORCipher and Encryption classes.
a. When testing the CaesarCipher and XORCipher classes, the JUnit assertArrayEquals() assertion will be helpful.
b. When testing the Encryption class you can encrypt the projects pom.xml file creating a pom.xml.cipher file with the encrypted results. Then decrypt pom.xml.cipher into pom.xml.clear. Finally compare pom.xml to pom.xml.cipher byte-by-byte to make sure that most bytes are different. Then compare pom.xml to pom.xml.clear to make sure that they are identical.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!