The EMA program can be utilized as a library in two manners.
- Example of use of static (non instantiatable) version:
import static com.creoart.Ema.*;
public class Main {
public static void main(String[] args) {
setTimeZone("Europe/Rome");
setThousandsSeparator('.');
setLogFilesDirectory("C:\\Users\\guest\\ema\\log\\");
setKeyFilesDirectory("C:\\Users\\guest\\ema\\key\\");
setOriginFilesDirectory("C:\\Users\\guest\\ema\\src\\");
setEncryptedFilesDirectory("C:\\Users\\guest\\ema\\msk\\");
setDecryptedFilesDirectory("C:\\Users\\guest\\ema\\usk\\");
setKeyFilename("1711209280485720600_8f1ccb13b5a0128824b9f4841c7c8ae2.key");
fileEncryption("Dracula.txt", "");
}
- Example of use of not static (instantiatable) version:
import com.creoart.Ema;
public class Main {
public static void main(String[] args) {
Ema crypt = new Ema();
Ema crypt1 = new Ema();
crypt.setTimeZone("Europe/Rome");
crypt.setThousandsSeparator('.');
crypt.setLogFilesDirectory("C:\\Users\\guest\\ema\\log\\");
crypt.setKeyFilesDirectory("C:\\Users\\guest\\ema\\key\\");
crypt.setOriginFilesDirectory("C:\\Users\\guest\\ema\\src\\");
crypt.setEncryptedFilesDirectory("C:\\Users\\guest\\ema\\msk\\");
crypt.setDecryptedFilesDirectory("C:\\Users\\guest\\ema\\usk\\");
crypt.setKeyFilename("1711209280485720600_8f1ccb13b5a0128824b9f4841c7c8ae2.key");
crypt.fileEncryption("Dracula.txt", "");
crypt.settingList();
crypt1.settingList();
}