Skip to content

Commit

Permalink
Final bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhhRamesh committed Nov 10, 2020
1 parent 52d2999 commit f19d1fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Crypto-CS107-2020/src/crypto/Encrypt.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ public static String encrypt(String message, String key, int type) {
output = bytesToString(xor(plainText, keyByte));
// By default, space encoding is OFF for XOR
} else if (type == ONETIME) { //ONETIME = 3
if (oneTimePad(plainText, keyBytes) != plainText) {
output = bytesToString(oneTimePad(plainText, keyBytes));
}
else {
output = "";
}
output = bytesToString(oneTimePad(plainText, keyBytes));
// By default, space encoding is ON for Onetimepad
} else if (type == CBC) { //CBC = 4
output = bytesToString(cbc(plainText, keyBytes));
Expand Down
Binary file modified Crypto-CS107-2020/src/crypto/Main.java
Binary file not shown.

0 comments on commit f19d1fd

Please sign in to comment.