SevenZipArchive.Open(path7ZipPass, options)) exception: Specified method is not supported. password is supplied #441

Open
opened 2026-01-29 22:12:06 +00:00 by claunia · 0 comments
Owner

Originally created by @HerbeeHitchcock on GitHub (Mar 8, 2021).

var options = new ReaderOptions
{
Password = pass
};
using (var archive = SevenZipArchive.Open(path7ZipPass, options))
using (var reader = archive.ExtractAllEntries())
{
try
{
reader.WriteAllToDirectory(destinationDirectory);
}
catch (Exception e)
{
Assert.Fail("no password supplied for encrypted zip.");
}
}

Originally created by @HerbeeHitchcock on GitHub (Mar 8, 2021). var options = new ReaderOptions { Password = pass }; using (var archive = SevenZipArchive.Open(path7ZipPass, options)) using (var reader = archive.ExtractAllEntries()) { try { reader.WriteAllToDirectory(destinationDirectory); } catch (Exception e) { Assert.Fail("no password supplied for encrypted zip."); } }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#441