Question: 5 . Create an EncryptionMethod interface as outlined above. 6 . Refactor the CaesarCipher and XORCipher classes to inherit from the EncryptionMethod interface. 7 .
Create an EncryptionMethod interface as outlined above.
Refactor the CaesarCipher and XORCipher classes to inherit from the EncryptionMethod interface.
Implement an Encryption class that has an encryptFile and decryptFile method. Each method should take an input Path, output Path and an EncryptionMethod argument.
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.xmlcipher file with the encrypted results. Then decrypt pom.xmlcipher into pom.xmlclear. Finally compare pom.xml to pom.xmlcipher bytebybyte to make sure that most bytes are different. Then compare pom.xml to pom.xmlclear 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
