Class RarArchiveLoadOptions

Class RarArchiveLoadOptions

Název místa: Aspose.Zip.Rar Sbírka: Aspose.Zip.dll (25.5.0)

Možnosti, se kterými je Aspose.Zip.Rar. RarArchive stažen z komprimovaného souboru.

public class RarArchiveLoadOptions

Inheritance

object RarArchiveLoadOptions

Dědiční členové

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

RarArchiveLoadOptions()

public RarArchiveLoadOptions()

Properties

DecryptionPassword

Obdržíte nebo nastavíte heslo pro dešifrování vstupů a jmen vstup.

public string DecryptionPassword { get; set; }

Hodnota nemovitosti

string

Examples

Můžete poskytnout dešifrovací heslo jednou na archivní extrakci.

using (FileStream fs = File.OpenRead("encrypted_archive.rar"))
{
    using (var extracted = File.Create("extracted.bin"))
    {
        using (RarArchive archive = new RarArchive(fs, new ArchiveLoadOptions() { DecryptionPassword = "p@s$" }))
        {
            using (var decompressed = archive.Entries[0].Open())
            {
                byte[] b = new byte[8192];
                int bytesRead;
                while (0 < (bytesRead = decompressed.Read(b, 0, b.Length)))
                    extracted.Write(b, 0, bytesRead);

            }
        }
    }
}

Vidět také

RarArchiveEntry . Open ( string )

 Čeština