Download this file

PeaSettings.java    102 lines (88 with data), 3.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
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;
}
}