密码保护 ZIP
using IronZip;
using IronZip.Enum;

// Create empty ZIP with highest compression
using (var archive = new IronZipArchive(9))
{
    // Password protect the ZIP (Support AES128 & AES256)
    archive.Encrypt("P@ssw0rd", EncryptionMethods.Traditional);

    archive.Add("./assets/image1.jpg");
    archive.Add("./assets/image2.jpg");

    // Export the ZIP
    archive.SaveAs("output.zip");
}
NuGet Download
PM > Install-Package IronZip
密码保护 ZIP

密码保护 ZIP

密码保护 ZIP 文件涉及向归档文件中添加密码以保护其内容。 这样可以确保只有拥有正确密码的用户才能提取或访问 ZIP 压缩包中的文件。该密码起到加密作用,防止未经授权的用户访问压缩包中存储的文件。要从受密码保护的 ZIP 压缩包中提取文件,用户必须输入正确的密码。

了解如何创建、读取和提取 ZIP 文件
在 GitHub 上查看

准备开始了吗?

Nuget Downloads 24,981版本:2026.11刚刚发布