I want to extract the files from a given .rar archive, which is password protected. I have the following:
pwd = "password";
srs = @"c:\path\file.rar"
des = @"c:\path\folder"
using (var archive = RarArchive.Open(srs, new ReaderOptions() { Password = pwd }))
{
foreach (var entry in archive.Entries)
{
entry.WriteToDirectory(des, new ExtractionOptions()
{
ExtractFullPath = true,
Overwrite = true
});
}
but it extracts the files corrupted, both when the password is correct and incorrect.