mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
SevenZipArchive.Open(path7ZipPass, options)) exception: Specified method is not supported. password is supplied #441
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.");
}
}