v0.2.1
This commit is contained in:
@@ -12,8 +12,7 @@
|
|||||||
},
|
},
|
||||||
"repo": {
|
"repo": {
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"me.hatter:commons:3.33",
|
"me.hatter:commons:3.34",
|
||||||
"org.bouncycastle:bcprov-jdk15on:1.62",
|
|
||||||
"info.picocli:picocli:4.6.1"
|
"info.picocli:picocli:4.6.1"
|
||||||
],
|
],
|
||||||
"testDependencies": [
|
"testDependencies": [
|
||||||
|
|||||||
@@ -16,12 +16,10 @@ import me.hatter.tools.tinyencrypt.config.TinyEncryptConfig;
|
|||||||
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
|
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
|
||||||
import me.hatter.tools.tinyencrypt.encrypt.EncryptedFileUtil;
|
import me.hatter.tools.tinyencrypt.encrypt.EncryptedFileUtil;
|
||||||
import me.hatter.tools.tinyencrypt.encrypt.TinyEncryptMeta;
|
import me.hatter.tools.tinyencrypt.encrypt.TinyEncryptMeta;
|
||||||
import me.hatter.tools.tinyencrypt.util.BCUtil;
|
|
||||||
import picocli.CommandLine;
|
import picocli.CommandLine;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.security.KeyPair;
|
import java.security.KeyPair;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ public class TinyEncryptMain {
|
|||||||
private static final LogTool log;
|
private static final LogTool log;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
BCUtil.init();
|
|
||||||
LogConfig.initMuteInfoMode();
|
LogConfig.initMuteInfoMode();
|
||||||
log = LogTools.getLogTool(TinyEncryptMain.class);
|
log = LogTools.getLogTool(TinyEncryptMain.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package me.hatter.tools.tinyencrypt.config;
|
package me.hatter.tools.tinyencrypt.config;
|
||||||
|
|
||||||
public class TinyEncryptConstant {
|
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";
|
public static final String ENC_FILE_EXT = ".tinyenc";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,17 +10,12 @@ import me.hatter.tools.commons.tlv.Tlv;
|
|||||||
import me.hatter.tools.commons.tlv.TlvUtil;
|
import me.hatter.tools.commons.tlv.TlvUtil;
|
||||||
import me.hatter.tools.tinyencrypt.config.TinyEncryptConfig;
|
import me.hatter.tools.tinyencrypt.config.TinyEncryptConfig;
|
||||||
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
|
import me.hatter.tools.tinyencrypt.config.TinyEncryptConstant;
|
||||||
import me.hatter.tools.tinyencrypt.util.BCUtil;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
public class EncryptedFileUtil {
|
public class EncryptedFileUtil {
|
||||||
private static final LogTool log = LogTools.getLogTool(EncryptedFileUtil.class);
|
private static final LogTool log = LogTools.getLogTool(EncryptedFileUtil.class);
|
||||||
|
|
||||||
static {
|
|
||||||
BCUtil.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean decryptFile(TinyEncryptConfig config, File file) {
|
public static boolean decryptFile(TinyEncryptConfig config, File file) {
|
||||||
File decFile = getDecryptFile(file);
|
File decFile = getDecryptFile(file);
|
||||||
if (decFile == null) {
|
if (decFile == null) {
|
||||||
|
|||||||
@@ -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() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user