英文:
ZIP Entire Directory with Password
问题
如何将整个目录(包括子文件夹)压缩成ZIP,并使用密码保护ZIP文件并加密其内容?
这是Java代码。
英文:
How can I ZIP an entire directory (including subfolders) and protect the ZIP with a password + encrypt the contents?
This is java
答案1
得分: 0
使用 zip4j,您可以像这样加密一个文件夹:
new ZipFile("file.zip", "your_password".toCharArray()).addFolder("/path/to/your/folder");
英文:
With zip4j, you can encrypt a folder like this:
new ZipFile("file.zip", "your_password".toCharArray()).addFolder("/path/to/your/folder");
专注分享java语言的经验与见解,让所有开发者获益!
评论