package settings;
import javax.swing.JDialog;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.Blake2bDigest;
import org.bouncycastle.crypto.engines.ThreefishEngine;
import cologne.eck.peafactory.crypto.kdf.CatenaKDF;
import cologne.eck.peafactory.crypto.kdf.KeyDerivation;
/*
* This class is only used by Peafactory internally
* and is not modified by FileModifier
*
*/
public class PeaSettings {
// private static JDialog keyboard = null;
private static final JDialog pswGenerator = null;
private static boolean KEY_FILE_PROPERTY = true;
private static String EXTERNAL_FILE_PATH = null;
// private static boolean EXTERN_FILE = true;
private static final String JAR_FILE_NAME = "default";
private static final String LABEL_TEXT = null;
private static final byte[] PROGRAM_RANDOM_BYTES = {-128, 125, -121, 32, -104, 88, -90, -116, 122, -64, 58, 67, -4, -51, -93, -89, 70, -22, -61, -109, 114, 75, -49, -114, -42, -128, -71, 5, -48, -92, 0, -71};
private static final byte[] FILE_IDENTIFIER = {108, -39, -123, 86, 41, -111, -124, 107};
private static final BlockCipher CIPHER_ALGO = new ThreefishEngine(512);
private static final Digest HASH_ALGO = new Blake2bDigest();
private static final KeyDerivation KDF_SCHEME = new CatenaKDF();//PeaFactory.getDefaultKDF();
private static final int ITERATIONS = CatenaKDF.getDragonflyLambda();//2
private static final int MEMORY = CatenaKDF.getGarlicDragonfly();//18;
private static final int PARALLELIZATION = 0;
private static final String VERSION_STRING = "Dragonfly-Full";
// public final static JDialog getKeyboard() {
// return keyboard;
// }
public final static JDialog getPswGenerator() {
return pswGenerator;
}
public final static Digest getHashAlgo() {
return HASH_ALGO;
}
public final static BlockCipher getCipherAlgo() {
return CIPHER_ALGO;
}
public final static KeyDerivation getKdfScheme() {
return KDF_SCHEME;
}
public final static int getIterations() {
return ITERATIONS;
}
public final static int getMemory() {
return MEMORY;
}
public final static int getParallelization() {
return PARALLELIZATION;
}
public final static String getVersionString() {
return VERSION_STRING;
}
public final static byte[] getProgramRandomBytes() {
return PROGRAM_RANDOM_BYTES;
}
public final static byte[] getFileIdentifier() {
return FILE_IDENTIFIER;
}
public final static String getJarFileName() {
return JAR_FILE_NAME;
}
public final static String getLabelText() {
return LABEL_TEXT;
}
/* public final static boolean getExternFile() {
return EXTERN_FILE;
}
public final static void setExternFile(boolean extern) {
EXTERN_FILE = extern;
}*/
public final static boolean getKeyFileProperty() {
return KEY_FILE_PROPERTY;
}
public final static void setKeyFileProperty(boolean bound) {
KEY_FILE_PROPERTY = bound;
}
public final static String getExternalFilePath() {
return EXTERNAL_FILE_PATH;
}
public static void setExternalFilePath(String selectedFileName) {
EXTERNAL_FILE_PATH = selectedFileName;
}
}