Merge
This commit is contained in:
186
pom.xml
186
pom.xml
@@ -1,93 +1,93 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>mattrixwv</groupId>
|
<groupId>mattrixwv</groupId>
|
||||||
<artifactId>CipherStreamJava</artifactId>
|
<artifactId>CipherStreamJava</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>CipherStreamJava</name>
|
<name>CipherStreamJava</name>
|
||||||
<url>http://www.mattrixwv.com</url>
|
<url>http://www.mattrixwv.com</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>14</maven.compiler.source>
|
<maven.compiler.source>14</maven.compiler.source>
|
||||||
<maven.compiler.target>14</maven.compiler.target>
|
<maven.compiler.target>14</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.13.2</version>
|
<version>4.13.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!--Ensure maven is the correct version-->
|
<!--Ensure maven is the correct version-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
<version>3.0.0-M3</version>
|
<version>3.0.0-M3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>enforce-maven</id>
|
<id>enforce-maven</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>enforce</goal>
|
<goal>enforce</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<rules>
|
<rules>
|
||||||
<requireMavenVersion>
|
<requireMavenVersion>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</requireMavenVersion>
|
</requireMavenVersion>
|
||||||
</rules>
|
</rules>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!--Clean lifecycle, see https://maven.apache.org/ref/current/maven-core-lifecycles.html#clean_Lifecycle-->
|
<!--Clean lifecycle, see https://maven.apache.org/ref/current/maven-core-lifecycles.html#clean_Lifecycle-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!--Default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging-->
|
<!--Default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.2.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefile-plugin</artifactId>
|
<artifactId>maven-surefile-plugin</artifactId>
|
||||||
<version>3.0.0-M5</version>
|
<version>3.0.0-M5</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.2.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-install-plugin</artifactId>
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
<version>3.0.0-M1</version>
|
<version>3.0.0-M1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>3.0.0-M1</version>
|
<version>3.0.0-M1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!--Site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle-->
|
<!--Site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
<version>3.9.1</version>
|
<version>3.9.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.1.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Atbash.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Atbash.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-25-21
|
||||||
//Modified: 12-25-21
|
//Modified: 07-25-21
|
||||||
//This is the declaration of the Atbash class
|
//This is the declaration of the Atbash class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
|
|
||||||
public class Atbash{
|
public class Atbash{
|
||||||
|
public static final String version = "1.0";
|
||||||
private String inputString; //Holds the string that needs encoded or decoded
|
private String inputString; //Holds the string that needs encoded or decoded
|
||||||
private String outputString; //The encoded/decoded string
|
private String outputString; //Holds teh current version of the library
|
||||||
private boolean leaveCapitals; //Whether to respect capitals in the output string
|
|
||||||
private boolean leaveWhitespace; //Whether to respect whitespace in the output string
|
|
||||||
//Decodes inputString and stores in outputString
|
//Decodes inputString and stores in outputString
|
||||||
private String decode(){
|
private String decode(){
|
||||||
StringBuilder output = new StringBuilder();
|
StringBuilder output = new StringBuilder();
|
||||||
@@ -27,16 +26,7 @@ public class Atbash{
|
|||||||
StringBuilder output = new StringBuilder();
|
StringBuilder output = new StringBuilder();
|
||||||
//Step through every element in the inputString and shift it the correct amount
|
//Step through every element in the inputString and shift it the correct amount
|
||||||
for(int cnt = 0;cnt < inputString.length();++cnt){
|
for(int cnt = 0;cnt < inputString.length();++cnt){
|
||||||
//Skip any whitespace
|
output.append((char)(inputString.charAt(cnt) + 25 - (2 * (inputString.charAt(cnt) - 'A'))));
|
||||||
if(Character.isWhitespace(inputString.charAt(cnt))){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
//Use either uppercase or lowercase for the base
|
|
||||||
char letterBase = 'a';
|
|
||||||
if(Character.isUpperCase(inputString.charAt(cnt))){
|
|
||||||
letterBase = 'A';
|
|
||||||
}
|
|
||||||
output.append((char)(inputString.charAt(cnt) + 25 - (2 * (inputString.charAt(cnt) - letterBase))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outputString = output.toString();
|
outputString = output.toString();
|
||||||
@@ -44,29 +34,15 @@ public class Atbash{
|
|||||||
}
|
}
|
||||||
//Removes all invalid characters and sets inputString
|
//Removes all invalid characters and sets inputString
|
||||||
private void setInputString(String input){
|
private void setInputString(String input){
|
||||||
if(!leaveCapitals){
|
//Convert all letters to uppercase
|
||||||
//Convert all letters to uppercase
|
input = input.toUpperCase();
|
||||||
input = input.toUpperCase();
|
//Remove all characters except capital letters
|
||||||
}
|
input = input.replaceAll("[^A-Z]", "");
|
||||||
if(!leaveWhitespace){
|
|
||||||
//Remove all characters except capital letters
|
|
||||||
input = input.toLowerCase();
|
|
||||||
}
|
|
||||||
//Save the string
|
//Save the string
|
||||||
inputString = input;
|
inputString = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Atbash(){
|
|
||||||
reset();
|
|
||||||
leaveCapitals = false;
|
|
||||||
leaveWhitespace = false;
|
|
||||||
}
|
|
||||||
public Atbash(boolean leaveCapitals, boolean leaveWhitespace){
|
|
||||||
reset();
|
|
||||||
this.leaveCapitals = leaveCapitals;
|
|
||||||
this.leaveWhitespace = leaveWhitespace;
|
|
||||||
}
|
|
||||||
public String getInputString(){
|
public String getInputString(){
|
||||||
return inputString;
|
return inputString;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Caesar.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Caesar.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-25-21
|
||||||
//Modified: 12-25-21
|
//Modified: 07-25-21
|
||||||
//This is the declaration of the Caesar class
|
//This is the declaration of the Caesar class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
|
|
||||||
public class Caesar{
|
public class Caesar{
|
||||||
|
public static final String version = "1.0"; //The current version number for the library
|
||||||
private String inputString; //The string that needs encoded/decoded
|
private String inputString; //The string that needs encoded/decoded
|
||||||
private String outputString; //The encoded/decoded string
|
private String outputString; //The encoded/decoded string
|
||||||
private int shift; //The amount that you need to shift each letter
|
private int shift; //The amount that you need to shift each letter
|
||||||
private boolean leaveCapitals; //Whether to respect capitals in the output string
|
|
||||||
private boolean leaveWhitespace; //Whether to respect whitespace in the output string
|
|
||||||
//Sets shift and makes sure it is within the propper bounds
|
//Sets shift and makes sure it is within the propper bounds
|
||||||
private void setShift(int shiftAmount){
|
private void setShift(int shiftAmount){
|
||||||
//If you shift more than 26 you will just be wrapping back around again
|
//If you shift more than 26 you will just be wrapping back around again
|
||||||
@@ -19,12 +18,6 @@ public class Caesar{
|
|||||||
}
|
}
|
||||||
//Sets the input string
|
//Sets the input string
|
||||||
private void setInputString(String inputString){
|
private void setInputString(String inputString){
|
||||||
if(!leaveCapitals){
|
|
||||||
inputString = inputString.toLowerCase();
|
|
||||||
}
|
|
||||||
if(!leaveWhitespace){
|
|
||||||
inputString = inputString.replaceAll("\\s+", "");
|
|
||||||
}
|
|
||||||
this.inputString = inputString;
|
this.inputString = inputString;
|
||||||
}
|
}
|
||||||
//Encodes the inputString and stores the result in outputString
|
//Encodes the inputString and stores the result in outputString
|
||||||
@@ -99,13 +92,6 @@ public class Caesar{
|
|||||||
//Constructor
|
//Constructor
|
||||||
public Caesar(){
|
public Caesar(){
|
||||||
reset();
|
reset();
|
||||||
leaveCapitals = false;
|
|
||||||
leaveWhitespace = false;
|
|
||||||
}
|
|
||||||
public Caesar(boolean leaveCapitals, boolean leaveWhitespace){
|
|
||||||
reset();
|
|
||||||
this.leaveCapitals = leaveCapitals;
|
|
||||||
this.leaveWhitespace = leaveWhitespace;
|
|
||||||
}
|
}
|
||||||
//Returns the inputString
|
//Returns the inputString
|
||||||
public String getInputString(){
|
public String getInputString(){
|
||||||
@@ -119,20 +105,6 @@ public class Caesar{
|
|||||||
public String getOutputString(){
|
public String getOutputString(){
|
||||||
return outputString;
|
return outputString;
|
||||||
}
|
}
|
||||||
//Returns if capitals should be respected in the output
|
|
||||||
public boolean getLeaveCapitals(){
|
|
||||||
return leaveCapitals;
|
|
||||||
}
|
|
||||||
public void setLeaveCapitals(boolean leaveCapitals){
|
|
||||||
this.leaveCapitals = leaveCapitals;
|
|
||||||
}
|
|
||||||
//Returns if whitespace should be respected in the output
|
|
||||||
public boolean getLeaveWhitespace(){
|
|
||||||
return leaveWhitespace;
|
|
||||||
}
|
|
||||||
public void setLeaveWhitespace(boolean leaveWhitespace){
|
|
||||||
this.leaveWhitespace = leaveWhitespace;
|
|
||||||
}
|
|
||||||
//Sets the shift and inputString and encodes the message
|
//Sets the shift and inputString and encodes the message
|
||||||
public String encode(int shiftAmount, String inputString){
|
public String encode(int shiftAmount, String inputString){
|
||||||
reset();
|
reset();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Morse.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Morse.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-26-21
|
// Created: 07-28-21
|
||||||
//Modified: 07-26-21
|
//Modified: 07-28-21
|
||||||
//This is the declaration of the Morse class
|
//This is the declaration of the Morse class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ public class Morse{
|
|||||||
"--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..", //M-Z
|
"--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--..", //M-Z
|
||||||
"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----." //0-9
|
"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----." //0-9
|
||||||
};
|
};
|
||||||
|
public static final String version = "1.0"; //The current library's version
|
||||||
private String inputString; //The string that needs encoded/decoded
|
private String inputString; //The string that needs encoded/decoded
|
||||||
private String outputString; //The encoded/decoded message
|
private String outputString; //The encoded/decoded message
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package mattrixwv.CipherStreamJava;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Vigenere{
|
public class Vigenere{
|
||||||
|
public static final String version = "1.0"; //The current library's version number
|
||||||
protected String inputString; //This is the string that needs encoded/decoded
|
protected String inputString; //This is the string that needs encoded/decoded
|
||||||
protected String outputString; //This is the string that is output after encoding/decoding
|
protected String outputString; //This is the string that is output after encoding/decoding
|
||||||
protected String keyword; //This is the keyword that is resposible for determining the offsets that you change each character by
|
protected String keyword; //This is the keyword that is resposible for determining the offsets that you change each character by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestAtbash.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestAtbash.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-25-21
|
||||||
//Modified: 12-25-21
|
//Modified: 07-25-21
|
||||||
//These are the tests for the Atbash class
|
//These are the tests for the Atbash class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
@@ -18,13 +18,13 @@ public class TestAtbash{
|
|||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "zyx";
|
String input = "zyx";
|
||||||
String correctOutput = "abc";
|
String correctOutput = "ABC";
|
||||||
String output = cipher.decode(input);
|
String output = cipher.decode(input);
|
||||||
assertEquals("Atbash Decoding failed the first test", correctOutput, output);
|
assertEquals("Atbash Decoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "GSV JFRXP YILDM ULC QFNKH LEVI - GSV OZAB WLT";
|
input = "GSV JFRXP YILDM ULC QFNKH LEVI - GSV OZAB WLT";
|
||||||
correctOutput = "thequickbrownfoxjumpsoverthelazydog";
|
correctOutput = "THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG";
|
||||||
output = cipher.decode(input);
|
output = cipher.decode(input);
|
||||||
assertEquals("Atbash Decoding failed the second test", correctOutput, output);
|
assertEquals("Atbash Decoding failed the second test", correctOutput, output);
|
||||||
}
|
}
|
||||||
@@ -34,13 +34,13 @@ public class TestAtbash{
|
|||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "abc";
|
String input = "abc";
|
||||||
String correctOutput = "zyx";
|
String correctOutput = "ZYX";
|
||||||
String output = cipher.encode(input);
|
String output = cipher.encode(input);
|
||||||
assertEquals("Atbash Encoding failed the first test", correctOutput, output);
|
assertEquals("Atbash Encoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
input = "The quick brown fox jumps over - the lazy dog";
|
||||||
correctOutput = "gsvjfrxpyildmulcqfnkhlevigsvozabwlt";
|
correctOutput = "GSVJFRXPYILDMULCQFNKHLEVIGSVOZABWLT";
|
||||||
output = cipher.encode(input);
|
output = cipher.encode(input);
|
||||||
assertEquals("Atbash Encoding failed the second test", correctOutput, output);
|
assertEquals("Atbash Encoding failed the second test", correctOutput, output);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//CipherStreamJava/src/test/java/mattrixwv/CipherStreamJava/TestCaesar.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestCaesar.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-25-21
|
||||||
//Modified: 12-25-21
|
//Modified: 07-25-21
|
||||||
//These are the tests for the Caesar class
|
//These are the tests for the Caesar class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ import org.junit.Test;
|
|||||||
public class TestCaesar{
|
public class TestCaesar{
|
||||||
@Test
|
@Test
|
||||||
public void testDecode(){
|
public void testDecode(){
|
||||||
Caesar cipher = new Caesar(true, true);
|
Caesar cipher = new Caesar();
|
||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "def";
|
String input = "def";
|
||||||
@@ -28,139 +28,24 @@ public class TestCaesar{
|
|||||||
correctOutput = "abc";
|
correctOutput = "abc";
|
||||||
output = cipher.decode(shift, input);
|
output = cipher.decode(shift, input);
|
||||||
assertEquals("Caesar Decoding failed the second test", correctOutput, output);
|
assertEquals("Caesar Decoding failed the second test", correctOutput, output);
|
||||||
//Test 3
|
|
||||||
input = "DEF";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "ABC";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
//Test 3
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
||||||
shift = -3;
|
shift = -3;
|
||||||
correctOutput = "The quick brown fox jumps over - the lazy dog";
|
correctOutput = "The quick brown fox jumps over - the lazy dog";
|
||||||
output = cipher.decode(shift, input);
|
output = cipher.decode(shift, input);
|
||||||
assertEquals("Caesar Decoding failed the fourth test", correctOutput, output);
|
assertEquals("Caesar Decoding failed the third test", correctOutput, output);
|
||||||
//Test 5
|
//Test 4
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
||||||
shift = 23;
|
shift = 23;
|
||||||
correctOutput = "The quick brown fox jumps over - the lazy dog";
|
correctOutput = "The quick brown fox jumps over - the lazy dog";
|
||||||
output = cipher.decode(shift, input);
|
output = cipher.decode(shift, input);
|
||||||
assertEquals("Caesar Decoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
|
||||||
@Test
|
|
||||||
public void testNoWhitespaceDecode(){
|
|
||||||
Caesar cipher = new Caesar(true, false);
|
|
||||||
|
|
||||||
//Test 1
|
|
||||||
String input = "def";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "abc";
|
|
||||||
String output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "def";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "abc";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "DEF";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "ABC";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "Thequickbrownfoxjumpsover-thelazydog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fourth test", correctOutput, output);
|
assertEquals("Caesar Decoding failed the fourth test", correctOutput, output);
|
||||||
//Test 5
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "Thequickbrownfoxjumpsover-thelazydog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
}
|
||||||
@Test
|
|
||||||
public void testNoCapitalDecode(){
|
|
||||||
Caesar cipher = new Caesar(false, true);
|
|
||||||
|
|
||||||
//Test 1
|
|
||||||
String input = "def";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "abc";
|
|
||||||
String output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "def";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "abc";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "DEF";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "abc";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "the quick brown fox jumps over - the lazy dog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fourth test", correctOutput, output);
|
|
||||||
//Test 5
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "the quick brown fox jumps over - the lazy dog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
|
||||||
@Test
|
|
||||||
public void testNoCapitalWhitespaceDecode(){
|
|
||||||
Caesar cipher = new Caesar(false, false);
|
|
||||||
|
|
||||||
//Test 1
|
|
||||||
String input = "def";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "abc";
|
|
||||||
String output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "def";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "abc";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "DEF";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "abc";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "thequickbrownfoxjumpsover-thelazydog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fourth test", correctOutput, output);
|
|
||||||
//Test 5
|
|
||||||
input = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "thequickbrownfoxjumpsover-thelazydog";
|
|
||||||
output = cipher.decode(shift, input);
|
|
||||||
assertEquals("Caesar Decoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEncode(){
|
public void testEncode(){
|
||||||
//Test 1
|
//Test 1
|
||||||
Caesar cipher = new Caesar(true, true);
|
Caesar cipher = new Caesar();
|
||||||
String input = "abc";
|
String input = "abc";
|
||||||
int shift = 3;
|
int shift = 3;
|
||||||
String correctOutput = "def";
|
String correctOutput = "def";
|
||||||
@@ -171,130 +56,19 @@ public class TestCaesar{
|
|||||||
shift = 29;
|
shift = 29;
|
||||||
correctOutput = "def";
|
correctOutput = "def";
|
||||||
output = cipher.encode(shift, input);
|
output = cipher.encode(shift, input);
|
||||||
assertEquals("Caesar Encoding failed the second test", correctOutput, output);
|
assertEquals("Caesar Encoding failed the second test - Expected: " + correctOutput + "; actual" + output, correctOutput, output);
|
||||||
//Test 3
|
|
||||||
input = "ABC";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "DEF";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Ceasar Encoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
//Test 3
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
input = "The quick brown fox jumps over - the lazy dog";
|
||||||
shift = -3;
|
shift = -3;
|
||||||
correctOutput = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
correctOutput = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
||||||
output = cipher.encode(shift, input);
|
output = cipher.encode(shift, input);
|
||||||
assertEquals("Caesar Encoding failed the fourth test", correctOutput, output);
|
assertEquals("Caesar Encoding failed the third test", correctOutput, output);
|
||||||
//Test 5
|
//Test 4
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
input = "The quick brown fox jumps over - the lazy dog";
|
||||||
shift = 23;
|
shift = 23;
|
||||||
correctOutput = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
correctOutput = "Qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
||||||
output = cipher.encode(shift, input);
|
output = cipher.encode(shift, input);
|
||||||
assertEquals("Caesar Encoding failed the fifth test", correctOutput, output);
|
assertEquals("Caesar Encoding failed the third test", correctOutput, output);
|
||||||
}
|
|
||||||
@Test
|
|
||||||
public void testNoWhitespaceEncode(){
|
|
||||||
//Test 1
|
|
||||||
Caesar cipher = new Caesar(true, false);
|
|
||||||
String input = "abc";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "def";
|
|
||||||
String output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "abc";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "def";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "ABC";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "DEF";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Ceasar Encoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "Qebnrfzhyoltkclugrjmplsbo-qebixwvald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fourth test", correctOutput, output);
|
|
||||||
//Test 5
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "Qebnrfzhyoltkclugrjmplsbo-qebixwvald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
|
||||||
@Test
|
|
||||||
public void testNoCapitalEncode(){
|
|
||||||
//Test 1
|
|
||||||
Caesar cipher = new Caesar(false, true);
|
|
||||||
String input = "abc";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "def";
|
|
||||||
String output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "abc";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "def";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "ABC";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "def";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Ceasar Encoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fourth test", correctOutput, output);
|
|
||||||
//Test 5
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "qeb nrfzh yoltk clu grjmp lsbo - qeb ixwv ald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
|
||||||
@Test
|
|
||||||
public void testNoCapitalWhitespaceEncode(){
|
|
||||||
//Test 1
|
|
||||||
Caesar cipher = new Caesar(false, false);
|
|
||||||
String input = "abc";
|
|
||||||
int shift = 3;
|
|
||||||
String correctOutput = "def";
|
|
||||||
String output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the first test", correctOutput, output);
|
|
||||||
//Test 2
|
|
||||||
input = "abc";
|
|
||||||
shift = 29;
|
|
||||||
correctOutput = "def";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the second test", correctOutput, output);
|
|
||||||
//Test 3
|
|
||||||
input = "ABC";
|
|
||||||
shift = 3;
|
|
||||||
correctOutput = "def";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Ceasar Encoding failed the third test", correctOutput, output);
|
|
||||||
|
|
||||||
//Test 4
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = -3;
|
|
||||||
correctOutput = "qebnrfzhyoltkclugrjmplsbo-qebixwvald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fourth test", correctOutput, output);
|
|
||||||
//Test 5
|
|
||||||
input = "The quick brown fox jumps over - the lazy dog";
|
|
||||||
shift = 23;
|
|
||||||
correctOutput = "qebnrfzhyoltkclugrjmplsbo-qebixwvald";
|
|
||||||
output = cipher.encode(shift, input);
|
|
||||||
assertEquals("Caesar Encoding failed the fifth test", correctOutput, output);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,59 +1,59 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestVigenere.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestMorse.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-28-21
|
||||||
//Modified: 07-25-21
|
//Modified: 07-28-21
|
||||||
//These are the tests for the Vigenere class
|
//These are the tests for the Morse class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
public class TestMorse{
|
public class TestMorse{
|
||||||
@Test
|
@Test
|
||||||
public void testDecode(){
|
public void testDecode(){
|
||||||
Morse cipher = new Morse();
|
Morse cipher = new Morse();
|
||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "... --- ...";
|
String input = "... --- ...";
|
||||||
String correctOutput = "SOS";
|
String correctOutput = "SOS";
|
||||||
String output = cipher.decode(input);
|
String output = cipher.decode(input);
|
||||||
assertEquals("Morse Decoding failed the first test", correctOutput, output);
|
assertEquals("Morse Decoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "-- --- .-. ... . -.-. --- -.. .";
|
input = "-- --- .-. ... . -.-. --- -.. .";
|
||||||
correctOutput = "MORSECODE";
|
correctOutput = "MORSECODE";
|
||||||
output = cipher.decode(input);
|
output = cipher.decode(input);
|
||||||
assertEquals("Morse Decoding failed the second test", correctOutput, output);
|
assertEquals("Morse Decoding failed the second test", correctOutput, output);
|
||||||
|
|
||||||
//Test 3
|
//Test 3
|
||||||
input = ".---- ..--- ...-- ----. ---.. --...";
|
input = ".---- ..--- ...-- ----. ---.. --...";
|
||||||
correctOutput = "123987";
|
correctOutput = "123987";
|
||||||
output = cipher.decode(input);
|
output = cipher.decode(input);
|
||||||
assertEquals("Morse Decoding failed the third test", correctOutput, output);
|
assertEquals("Morse Decoding failed the third test", correctOutput, output);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testEncode(){
|
public void testEncode(){
|
||||||
Morse cipher = new Morse();
|
Morse cipher = new Morse();
|
||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "sos";
|
String input = "sos";
|
||||||
String correctOutput = "... --- ...";
|
String correctOutput = "... --- ...";
|
||||||
String output = cipher.encode(input);
|
String output = cipher.encode(input);
|
||||||
assertEquals("Morse Encoding failed the first test", correctOutput, output);
|
assertEquals("Morse Encoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "MORSE, CODE";
|
input = "MORSE, CODE";
|
||||||
correctOutput = "-- --- .-. ... . -.-. --- -.. .";
|
correctOutput = "-- --- .-. ... . -.-. --- -.. .";
|
||||||
output = cipher.encode(input);
|
output = cipher.encode(input);
|
||||||
assertEquals("Morse Encoding failed the second test", correctOutput, output);
|
assertEquals("Morse Encoding failed the second test", correctOutput, output);
|
||||||
|
|
||||||
//Test 3
|
//Test 3
|
||||||
input = "1.23 987";
|
input = "1.23 987";
|
||||||
correctOutput = ".---- ..--- ...-- ----. ---.. --...";
|
correctOutput = ".---- ..--- ...-- ----. ---.. --...";
|
||||||
output = cipher.encode(input);
|
output = cipher.encode(input);
|
||||||
assertEquals("Morse Encoding failed the third test", correctOutput, output);
|
assertEquals("Morse Encoding failed the third test", correctOutput, output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +1,65 @@
|
|||||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestVigenere.java
|
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestVigenere.java
|
||||||
//Matthew Ellison
|
//Matthew Ellison
|
||||||
// Created: 07-25-21
|
// Created: 07-25-21
|
||||||
//Modified: 07-25-21
|
//Modified: 07-25-21
|
||||||
//These are the tests for the Vigenere class
|
//These are the tests for the Vigenere class
|
||||||
package mattrixwv.CipherStreamJava;
|
package mattrixwv.CipherStreamJava;
|
||||||
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
public class TestVigenere{
|
public class TestVigenere{
|
||||||
@Test
|
@Test
|
||||||
public void testDecode() throws Exception{
|
public void testDecode() throws Exception{
|
||||||
Vigenere cipher = new Vigenere();
|
Vigenere cipher = new Vigenere();
|
||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "xzb";
|
String input = "xzb";
|
||||||
String keyword = "xyz";
|
String keyword = "xyz";
|
||||||
String correctOutput = "ABC";
|
String correctOutput = "ABC";
|
||||||
String output = cipher.decode(keyword, input);
|
String output = cipher.decode(keyword, input);
|
||||||
assertEquals("Vigenere Decoding failed the first test", correctOutput, output);
|
assertEquals("Vigenere Decoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "LXFOPVEFRNHR";
|
input = "LXFOPVEFRNHR";
|
||||||
keyword = "LEMON";
|
keyword = "LEMON";
|
||||||
correctOutput = "ATTACKATDAWN";
|
correctOutput = "ATTACKATDAWN";
|
||||||
output = cipher.decode(keyword, input);
|
output = cipher.decode(keyword, input);
|
||||||
assertEquals("Vigenere Decoding failed the second test", correctOutput, output);
|
assertEquals("Vigenere Decoding failed the second test", correctOutput, output);
|
||||||
|
|
||||||
//Test 3
|
//Test 3
|
||||||
input = "CSASTPKVSIQUTGQUCSASTPIUAQJB";
|
input = "CSASTPKVSIQUTGQUCSASTPIUAQJB";
|
||||||
keyword = "ABCD";
|
keyword = "ABCD";
|
||||||
correctOutput = "CRYPTOISSHORTFORCRYPTOGRAPHY";
|
correctOutput = "CRYPTOISSHORTFORCRYPTOGRAPHY";
|
||||||
output = cipher.decode(keyword, input);
|
output = cipher.decode(keyword, input);
|
||||||
assertEquals("Vigenere Decoding failed the third test", correctOutput, output);
|
assertEquals("Vigenere Decoding failed the third test", correctOutput, output);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testEncode() throws Exception{
|
public void testEncode() throws Exception{
|
||||||
Vigenere cipher = new Vigenere();
|
Vigenere cipher = new Vigenere();
|
||||||
|
|
||||||
//Test 1
|
//Test 1
|
||||||
String input = "abc";
|
String input = "abc";
|
||||||
String keyword = "xyz";
|
String keyword = "xyz";
|
||||||
String correctOutput = "XZB";
|
String correctOutput = "XZB";
|
||||||
String output = cipher.encode(keyword, input);
|
String output = cipher.encode(keyword, input);
|
||||||
assertEquals("Vigenere Encoding failed the first test", correctOutput, output);
|
assertEquals("Vigenere Encoding failed the first test", correctOutput, output);
|
||||||
|
|
||||||
//Test 2
|
//Test 2
|
||||||
input = "Attack at dawn";
|
input = "Attack at dawn";
|
||||||
keyword = "Lemon";
|
keyword = "Lemon";
|
||||||
correctOutput = "LXFOPVEFRNHR";
|
correctOutput = "LXFOPVEFRNHR";
|
||||||
output = cipher.encode(keyword, input);
|
output = cipher.encode(keyword, input);
|
||||||
assertEquals("Vigenere Encoding failed the second test", correctOutput, output);
|
assertEquals("Vigenere Encoding failed the second test", correctOutput, output);
|
||||||
|
|
||||||
//Test 3
|
//Test 3
|
||||||
input = "'Crypto' is short for 'Cryptography'";
|
input = "'Crypto' is short for 'Cryptography'";
|
||||||
keyword = "abcd";
|
keyword = "abcd";
|
||||||
correctOutput = "CSASTPKVSIQUTGQUCSASTPIUAQJB";
|
correctOutput = "CSASTPKVSIQUTGQUCSASTPIUAQJB";
|
||||||
output = cipher.encode(keyword, input);
|
output = cipher.encode(keyword, input);
|
||||||
assertEquals("Vigenere Encoding failed the third test", correctOutput, output);
|
assertEquals("Vigenere Encoding failed the third test", correctOutput, output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user