This commit is contained in:
2021-04-16 22:33:33 +08:00
parent 5b256dd6e4
commit 31ff41e860
5 changed files with 2 additions and 25 deletions

View File

@@ -12,8 +12,7 @@
},
"repo": {
"dependencies": [
"me.hatter:commons:3.33",
"org.bouncycastle:bcprov-jdk15on:1.62",
"me.hatter:commons:3.34",
"info.picocli:picocli:4.6.1"
],
"testDependencies": [

View File

@@ -16,12 +16,10 @@ import me.hatter.tools.tinyencrypt.config.TinyEncryptConfig;
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
import me.hatter.tools.tinyencrypt.encrypt.EncryptedFileUtil;
import me.hatter.tools.tinyencrypt.encrypt.TinyEncryptMeta;
import me.hatter.tools.tinyencrypt.util.BCUtil;
import picocli.CommandLine;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.security.KeyPair;
import java.util.Date;
@@ -30,7 +28,6 @@ public class TinyEncryptMain {
private static final LogTool log;
static {
BCUtil.init();
LogConfig.initMuteInfoMode();
log = LogTools.getLogTool(TinyEncryptMain.class);
}

View File

@@ -1,7 +1,7 @@
package me.hatter.tools.tinyencrypt.config;
public class TinyEncryptConstant {
public static final String VERSION = "0.2.0";
public static final String VERSION = "0.2.1";
public static final String ENC_FILE_EXT = ".tinyenc";
}

View File

@@ -10,17 +10,12 @@ import me.hatter.tools.commons.tlv.Tlv;
import me.hatter.tools.commons.tlv.TlvUtil;
import me.hatter.tools.tinyencrypt.config.TinyEncryptConfig;
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
import me.hatter.tools.tinyencrypt.util.BCUtil;
import java.io.*;
public class EncryptedFileUtil {
private static final LogTool log = LogTools.getLogTool(EncryptedFileUtil.class);
static {
BCUtil.init();
}
public static boolean decryptFile(TinyEncryptConfig config, File file) {
File decFile = getDecryptFile(file);
if (decFile == null) {

View File

@@ -1,14 +0,0 @@
package me.hatter.tools.tinyencrypt.util;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import java.security.Security;
public class BCUtil {
static {
Security.addProvider(new BouncyCastleProvider());
}
public static void init() {
}
}