Skip to content

Latest commit

 

History

History
122 lines (97 loc) · 7.51 KB

M16_lab02.md

File metadata and controls

122 lines (97 loc) · 7.51 KB

####Name

####Gihubid

  • zhanchengqian
  • liang121900
  • Table of Content

    - [General Information](#pa) - [Current State](#pb) - [Functionality](#pc) - [Possible Improvement](#pd) - [About the README](#pe) - [About the build File](#pf) - [Current Issues](#pg) - [Additional Issues](#ph) - [Code Accessment](#pi) - [Code Quality](#pj)

  • a. General Information

    - Generally, this is a tool that can encrypt and decrypt the text users type with keys.

  • b. Current State

    + Encryption - For `Shift Cipher` - input: defend stalingrad (key: 2) - output: bcdclb qryjglepyb. - For `Affine cipher` - input: defend stalingrad (key: 3 2) - output: jsbsvj oxidcvkfij. - For `Vigenere Cipher` - input: defend stalingrad (key: red) - output: macnja bpxuekpnxm. - For `Bifid Cipher` - input: defend stalingrad (key: CCCP) - output: PVGBEI SNRSBLKGEZ. - For `All Cipher` - input: defend stalingrad (key all above key combined) - output: all above outputs combined. + Decryption - You can do decryption which will lead you the other way around.

  • c. Functionality

    - The software is able to run and present the GUI to users. - This software provides four ways to encrypt/decrypt the plaintext with the keys the users type. - For convinience, it also provides an `All Ciphers` option that can encrypt one plaintext with four keys and generate the four output respectively and decrypt with four keys and four outputs. - For instruction, users can either click `Info` button for information of all ciphers or click the button of each cipher for specific requirement of key and plaintext.

  • d. Possible Improvement

    - When using all cipher, it can be a pop-up windows where you have eight input windows in which you put plaintexts and keys separately so that this makes more sense to the user. - Can possibly make the Encryption/Decryption button into a slide button (like you can slide it to one end to switch it to Encryption, the other end to switch it to Decryption) - Remember to change the info page, add more examples. (correct the “coprime” part instruction)

  • e. About the README

    - The README.md file has the sample output and input using two ciphers, but it would be better if it also has examples for the other two ciphers and the `All Ciphers`. - For the remark of W16, there should also have examples of `input more than one string with spaces in between` and `use all the ciphers at once to encrypt one string,` so that the next generation of folks can follows much more easily instead of keep getting the error message.

  • f. About the build File

    -All of them have already got proper descriptions. No further edit of the xml needed at this stage.

  • g. Current Issues

    - Besides the errors newly added by this group and not yet approved by the mentor. There are 8 errors available so far. - They worth more than 1000 points. - However, some requirement of the errors are not clear. - For the error [Make GUI look better](#15) , it does not state what specific improvement is expected.

  • h. Additional Issues

    - [Make the GUI look better (250 pts)](#32) - Make the Encryption/Decryption button into a slide button. - Change the “plaintext” label to “ciphered text” when in decryption mode - Change the position where the app shows up from startup) - [Improve input textbox function (200 pts)](#33) - Make the textbox bigger so that it can take several paragraph of messages, and also make it scrollable) - [Improve All-cipher function (250 pts)](#34) - When click All-cipher, there can be a pop-up windows where you have eight input windows in which you put plaintexts and keys separately so that this makes more sense to the user. - [Clipboard support & output cleanup (200pts)](#35) - User can copy the output text by just clicking a button & also add a button to cleanup the output field - [Define a QUAD encryption method (200pts)](#36) - User need to input four keys and just one string. The string will go through the encryption process as following: first Shift Cipher, then Affine Cipher, then Vignere Cipher and then Bifid Cipher. - [Make number input possible (200 pts)](#37) - Originally the App doesn't support number inputs, but it should be better if you can just type in "1201" instead of "one two zero one". And also the decrption method needs to correctly output to strings like "1201" instead of "one two zero one".

  • i. Code Assessment

    - The project has a build.xml file,a README.md file, a lib folder and a src folder. - A build directory is created when using `ant run`. All .class files generated will be there. - The lib folder has .jar file of Junit. - The src folder includes the .java file of GUI, test, cipher and math utility. - In the src folder. The organization of classes is clear engough. The GUI, different ciphers and test are separated into different classes, for example, the affine cipher has the AffineCipher class. - The relation of the classes is clear as well. The cipher classes use the static method of MathUtil class for mathmathical methods and the GUI make instance of the cipher classes, when a specific button is click. For eample, in the GUI class, an AffineCipher instance will be created when the `AffineCipher` or `AllCipher` buttons are clicked and it will use its method to pass through the plaintext and key and return the output. - The codes are moderatly easy to read. Most methods have comments that explain how they behave, except that the codes of the GUI is little bit messy. It might be better to factor out the method of `All Cipher` to another class. - Some helpful information to someone going to work on the code - Every cipher is in separated class. You may work on a cipher class if you want to edit the way the cipher encrypt or decrypt. - Every test for each cipher is also in separated class, so you may work on each test class if you want to examine the cipher classes. - If you want to work on the GUI, you need to look into the `CryptographyGUI` class.

  • j. Code Quality

    - The code covers all the tests that are necessary, 5-8 tests conducted for each encryption methods and also 5-8 tests conducted for each method in reverse (decryption methods). Enough amount of exception tests were conducted. It tests coprime situation for the Affine Cipher. It tests the details like constructor and getter methods, getcipherkey and setcipherkey methods. - More tests can be added to test the corner cases for each encryption methods. And definitely look into how to write a test program for the GUI itself once new feature added in.