[
  {
    "Id": "594258",
    "ThreadId": "253133",
    "Html": "\r\n<p>I wanted to prompt the user to enter a password and check at run time if that password &quot;works&quot;/is the right password for a zip or self-extractor.</p>\r\n<p>&nbsp;</p>\r\n<p>Is there an easy way to do this without having to try to extract something from the container?</p>\r\n",
    "PostedDate": "2011-04-08T09:02:41.823-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "594312",
    "ThreadId": "253133",
    "Html": "<p>No, I don't think so.&nbsp; There is no \"CheckPassword\" method.</p>\r\n<p>The way the password works on extraction is, the validation is performed implicitly when the first bytes are read.&nbsp; If that validation fails, then the call to Extract() fails with an exception.&nbsp; Today, there is no way exposed by the library, to validate a&nbsp; password without reading the data.</p>\r\n<p>If you call ZipEntry.Extract() and specify System.IO.Stream.Null , you can extract the entry into a bitbucket.&nbsp; You need not extract all bytes - just reading the first&nbsp;byte will validate the password. In other words, the check is about as cheap as it can be.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-04-08T10:28:48.17-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]