diff --git a/Crypto-CS107-2020/src/crypto/Encrypt.java b/Crypto-CS107-2020/src/crypto/Encrypt.java index c6a49fd..5756125 100644 --- a/Crypto-CS107-2020/src/crypto/Encrypt.java +++ b/Crypto-CS107-2020/src/crypto/Encrypt.java @@ -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)); diff --git a/Crypto-CS107-2020/src/crypto/Main.java b/Crypto-CS107-2020/src/crypto/Main.java index 48e46f2..9128544 100644 Binary files a/Crypto-CS107-2020/src/crypto/Main.java and b/Crypto-CS107-2020/src/crypto/Main.java differ