使用密码压缩整个目录

huangapple 未分类评论52阅读模式
英文:

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");

huangapple
  • 本文由 发表于 2020年4月9日 10:34:13
  • 转载请务必保留本文链接:https://java.coder-hub.com/61113066.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定