dev文件加解密操作 #1

Merged
database-mysql merged 4 commits from dev into main 2026-08-12 03:53:41 +08:00
Showing only changes of commit a0d6c6570f - Show all commits

View File

@@ -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);
}
}
}