Updating tests

This commit is contained in:
2023-05-05 20:19:27 -04:00
parent b3ca4754ea
commit 9c41f10576
45 changed files with 2729 additions and 2239 deletions

View File

@@ -1,7 +1,7 @@
//CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/polySubstitution/Affine.java
//Mattrixwv
// Created: 01-26-22
//Modified: 04-15-23
//Modified: 05-04-23
package com.mattrixwv.cipherstream.monosubstitution;
@@ -15,16 +15,17 @@ import com.mattrixwv.NumberAlgorithms;
public class Affine{
protected static Logger logger = LoggerFactory.getLogger(Affine.class);
private static final Logger logger = LoggerFactory.getLogger(Affine.class);
//Fields
protected boolean preserveCapitals; //Whether to respect capitals in the output string
protected boolean preserveSymbols; //Whether to respect symbols in the output string
protected boolean preserveWhitespace; //Whether to respect whitespace in the output string
protected String inputString; //The string that needs encoded/decoded
protected String inputString; //The string that needs encoded/decoded
protected String outputString; //The string that is output after encoding/decoding
protected int key1; //The multiplicative key. Key1 must be relatively prime to 26
protected int key2; //The additive key
//Settings
protected boolean preserveCapitals; //Persist capitals in the output string
protected boolean preserveSymbols; //Persist symbols in the output string
protected boolean preserveWhitespace; //Persist whitespace in the output string
//Ensures key1 constraints
protected void setKey1(int key1) throws InvalidKeywordException{
@@ -225,19 +226,16 @@ public class Affine{
return outputString;
}
//Returns the cleaned inputString
//Getters
public String getInputString(){
return inputString;
}
//Returns the outputString
public String getOutputString(){
return outputString;
}
//Returns the cleaned key1
public int getKey1(){
return key1;
}
//Returns the cleaned key2
public int getKey2(){
return key2;
}