dev文件加解密操作 #1
@@ -6,6 +6,7 @@ import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static top.gtb520.java.gnu.java.utils.library.utils.file.CreateFile.BinFileType;
|
||||
import static top.gtb520.java.gnu.java.utils.library.utils.file.EncryptionAndDecryption.EncryptionType;
|
||||
|
||||
|
||||
public interface main {
|
||||
@@ -148,4 +149,16 @@ public interface main {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 文件加解密操作
|
||||
interface EncryptionAndDecryption {
|
||||
// 文件加密
|
||||
static File FileEncrypt(File file, EncryptionType type, Path keyPath) throws Exception {
|
||||
return top.gtb520.java.gnu.java.utils.library.utils.file.EncryptionAndDecryption.EncryptionFile(file, type, keyPath);
|
||||
}
|
||||
// 文件解密
|
||||
static File DecryptionFile(File file, EncryptionType type, File keyfile) throws Exception {
|
||||
return top.gtb520.java.gnu.java.utils.library.utils.file.EncryptionAndDecryption.DecryptionFile(file, type, keyfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user