From c7459e65186ca22fb2d0888b973ec7f2ca4ed62d Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Tue, 22 Feb 2022 18:40:38 +0000 Subject: [PATCH] Updated tests --- .../monoSubstitution/Vigenere.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java b/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java index fd450a6..99a8417 100644 --- a/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java +++ b/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java @@ -1,7 +1,7 @@ //CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java //Matthew Ellison // Created: 07-25-21 -//Modified: 02-17-22 +//Modified: 02-22-22 package com.mattrixwv.CipherStreamJava.monoSubstitution; @@ -38,7 +38,7 @@ public class Vigenere{ } if(!preserveCapitals){ - inputString = inputString.toLowerCase(); + inputString = inputString.toUpperCase(); } if(!preserveWhitespace){ inputString = inputString.replaceAll("\\s", ""); @@ -175,17 +175,17 @@ public class Vigenere{ return offset; } //Encodes input using key and returns the result - public String encode(String key, String input) throws InvalidKeywordException, InvalidInputException{ + public String encode(String keyword, String inputString) throws InvalidKeywordException, InvalidInputException{ reset(); - setKeyword(key); - setInputString(input); + setKeyword(keyword); + setInputString(inputString); return encode(); } //Decodes input using key and returns the result - public String decode(String key, String input) throws InvalidKeywordException, InvalidInputException{ + public String decode(String keyword, String inputString) throws InvalidKeywordException, InvalidInputException{ reset(); - setKeyword(key); - setInputString(input); + setKeyword(keyword); + setInputString(inputString); return decode(); } //Makes sure all of the variables are empty