建议使用廉价/免费的.NET库来进行带AES加密的Zip?

时间:2023-01-14 15:00:45

I'm trying to find an zip compression and encryption component with encryption suitable for use by the US Federal Government, so I can't use Zip 2.0 encryption, it has to be AES or the like. I've already found SharpZipLib (can't do AES encyrption), and Chilkat (can do AES encryption, but costs money). Am I missing any other options?

我正在尝试找到适合美国联邦*使用的加密的zip压缩和加密组件,所以我不能使用Zip 2.0加密,它必须是AES等。我已经找到了SharpZipLib(不能做AES加密)和Chilkat(可以做AES加密,但要花钱)。我错过了其他任何选择吗?

5 个解决方案

#1


10  

How much would you be willing to pay for AES in DotNetZip? ;)

您愿意为DotNetZip中的AES支付多少钱? ;)

DotNetZip supports AES Encryption, with 128 or 256-bit keys.

DotNetZip支持AES加密,128位或256位密钥。

http://www.codeplex.com/DotNetZip

Example code:

  using (ZipFile zip = new ZipFile())
  {
    zip.AddFile("ReadMe.txt"); // no password for this entry

    // use a password for subsequent entries
    zip.Password= "This.Encryption.is.FIPS.197.Compliant!";
    zip.Encryption= EncryptionAlgorithm.WinZipAes256;
    zip.AddFile("Rawdata-2008-12-18.csv");
    zip.Save("Backup-AES-Encrypted.zip");
  }

The AES-encrypted zip files produced by DotNetZip can be read and extracted by WinZip, and vice-versa.

由DotNetZip生成的AES加密的zip文件可以通过WinZip读取和提取,反之亦然。

You can also just create regular zip files without encryption.

您也可以只创建常规zip文件而不加密。

oh, and it's free.

哦,它是免费的。

#2


6  

What about 7-Zip? It's open source under the LGPL (so should be usable in your project) and according to the spec it supports ZIP with AES encryption.

7-Zip怎么样?它是LGPL下的开源(所以应该可以在你的项目中使用)并且根据规范它支持带有AES加密的ZIP。

#3


6  

If money is a big issue, you could take an open source library like this http://www.codeplex.com/DotNetZip, which now has AES support

如果资金是一个大问题,你可以采取这样的开源库http://www.codeplex.com/DotNetZip,现在有AES支持

#4


1  

Check out this awesome article on the Stream Pipeline. It not only defines a cool way to link streams to each other in a multithreaded fashion, the example used is compression followed by encryption.

查看Stream Pipeline上的这篇精彩文章。它不仅定义了以多线程方式将流相互链接的酷炫方式,使用的示例是压缩,然后是加密。

#5


1  

You can use #ZipLib (https://icsharpcode.github.io/SharpZipLib/), which is a lightweight alternative to DotNetZipLib.

您可以使用#ZipLib(https://icsharpcode.github.io/SharpZipLib/),它是DotNetZipLib的轻量级替代品。

It offers the FastZip class, which reduces compression of a folder on the HDD with AES encryption to 2-3 lines of code.

它提供了FastZip类,可以将使用AES加密的HDD上的文件夹压缩到2-3行代码。

See the wiki for reference: https://github.com/icsharpcode/SharpZipLib/wiki/FastZip

请参阅维基以供参考:https://github.com/icsharpcode/SharpZipLib/wiki/FastZip

If you need more features, #ZipLib gets a bit more complicated than DotNetZipLib, but the latter created corrupted ZIP files in my case, so i use SharpZipLib anyways.

如果您需要更多功能,#ZipLib比DotNetZipLib更复杂,但后者在我的情况下创建了损坏的ZIP文件,所以我仍然使用SharpZipLib。

#1


10  

How much would you be willing to pay for AES in DotNetZip? ;)

您愿意为DotNetZip中的AES支付多少钱? ;)

DotNetZip supports AES Encryption, with 128 or 256-bit keys.

DotNetZip支持AES加密,128位或256位密钥。

http://www.codeplex.com/DotNetZip

Example code:

  using (ZipFile zip = new ZipFile())
  {
    zip.AddFile("ReadMe.txt"); // no password for this entry

    // use a password for subsequent entries
    zip.Password= "This.Encryption.is.FIPS.197.Compliant!";
    zip.Encryption= EncryptionAlgorithm.WinZipAes256;
    zip.AddFile("Rawdata-2008-12-18.csv");
    zip.Save("Backup-AES-Encrypted.zip");
  }

The AES-encrypted zip files produced by DotNetZip can be read and extracted by WinZip, and vice-versa.

由DotNetZip生成的AES加密的zip文件可以通过WinZip读取和提取,反之亦然。

You can also just create regular zip files without encryption.

您也可以只创建常规zip文件而不加密。

oh, and it's free.

哦,它是免费的。

#2


6  

What about 7-Zip? It's open source under the LGPL (so should be usable in your project) and according to the spec it supports ZIP with AES encryption.

7-Zip怎么样?它是LGPL下的开源(所以应该可以在你的项目中使用)并且根据规范它支持带有AES加密的ZIP。

#3


6  

If money is a big issue, you could take an open source library like this http://www.codeplex.com/DotNetZip, which now has AES support

如果资金是一个大问题,你可以采取这样的开源库http://www.codeplex.com/DotNetZip,现在有AES支持

#4


1  

Check out this awesome article on the Stream Pipeline. It not only defines a cool way to link streams to each other in a multithreaded fashion, the example used is compression followed by encryption.

查看Stream Pipeline上的这篇精彩文章。它不仅定义了以多线程方式将流相互链接的酷炫方式,使用的示例是压缩,然后是加密。

#5


1  

You can use #ZipLib (https://icsharpcode.github.io/SharpZipLib/), which is a lightweight alternative to DotNetZipLib.

您可以使用#ZipLib(https://icsharpcode.github.io/SharpZipLib/),它是DotNetZipLib的轻量级替代品。

It offers the FastZip class, which reduces compression of a folder on the HDD with AES encryption to 2-3 lines of code.

它提供了FastZip类,可以将使用AES加密的HDD上的文件夹压缩到2-3行代码。

See the wiki for reference: https://github.com/icsharpcode/SharpZipLib/wiki/FastZip

请参阅维基以供参考:https://github.com/icsharpcode/SharpZipLib/wiki/FastZip

If you need more features, #ZipLib gets a bit more complicated than DotNetZipLib, but the latter created corrupted ZIP files in my case, so i use SharpZipLib anyways.

如果您需要更多功能,#ZipLib比DotNetZipLib更复杂,但后者在我的情况下创建了损坏的ZIP文件,所以我仍然使用SharpZipLib。