[
  {
    "Id": "447740",
    "ThreadId": "213947",
    "Html": "<p>Can we&nbsp;encrypt already zipped file&nbsp;?? &nbsp;Can this be done&nbsp;using dotnetzip.</p>",
    "PostedDate": "2010-05-26T09:47:46.6-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "447932",
    "ThreadId": "213947",
    "Html": "<p>probably</p>\r\n<p>but you'll have to explain more clearly what you want.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-26T19:35:37.413-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "448246",
    "ThreadId": "213947",
    "Html": "<p>Thanks for the response. If we already have a zipped file, just for encryption purpose, can we use the dotnetzip library.</p>\r\n<p>Wondering to find if encryption using dotnetzip, will be better than TripleDESCryptoServiceProvider.</p>\r\n<p>&nbsp;Any help will be appreciated.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-27T08:59:59.697-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "448441",
    "ThreadId": "213947",
    "Html": "<p>You can encrypt arbitrary data&nbsp;with the general-purpose CryptoTransform things&nbsp;that are built-in to .NET.&nbsp;&nbsp;&nbsp; There's plenty of information on how to do that. How you select your encryption approach is not really something I can help with.</p>\r\n<p>The ZIP specification supports encryption.&nbsp;&nbsp; There are 2 flavors of encryption supported in DotNetZip:&nbsp;</p>\r\n<ol>\r\n<li>zip &quot;classic&quot; encryption, which is very weak, and should not really be considered encryption at all,&nbsp; and...</li>\r\n<li>WinZip AES encryption.&nbsp; This isn't really part of the PKZIP spec, but is something that WinZip added later, to address the shortcomings of traditional PKZIP encryption.&nbsp; The makers of WinZip specified their approach publicly, so I've implemented that in DotNetZip. </li>\r\n</ol>\r\n<p>There are other crypto standards supported in ZIP archives - in particular PKWARE's SecureZip product offers a choice of different algorithms, including RC2, TwoFish, Blowfish, and an alternative AES approach, among others.&nbsp; DotNetZip doesn't support any of them.&nbsp;</p>\r\n<p>In all cases, for ZIP encryption, what is encrypted is the content of each entry in the zip file.&nbsp; Using Zip encryption (either flavor I described above) The zip file itself is not encrypted.&nbsp; This means anyone can read the list of files in the zip archive.</p>\r\n<p>The advantage of zip encryption is that it's easy to do in DotNetZip.&nbsp; One disadvantage is that the list of entries is still viewable.&nbsp; (** SecureZIP also does &quot;central directory encryption&quot;, which would prevent the viewing of the list of entries without a password.&nbsp; But DotNetZip doesn't do that, either.)</p>\r\n<p>On the other hand, you can encrypt the zip file in its entirety, using the .NET classes I mentioned.&nbsp; That would give you privacy of the entry list in the zip archive.&nbsp; The disadvantage is, it's not as simple as doing encryption within the zip file, using DotNetZip.</p>\r\n<p>To answer your specific question, if you have an existing&nbsp;zip file that does not use encryption, then DotNetZip can't be used to encrypt it unless:</p>\r\n<ul>\r\n<li>you unzip the file, then re-zip all the files using DotNetZip into a new zipfile, this time with encryption</li>\r\n<li>you embed the existing zip file in a second zip file, using encryption through DotNetZip</li>\r\n</ul>\r\n<p>I hope that clears things up.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-05-27T16:33:04.733-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]