Class SevenZipAESEncryptionSettings

Class SevenZipAESEncryptionSettings

Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)

Základní třída pro nastavení několika metod šifrování 7z.

public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings

Dědění

objectSevenZipEncryptionSettingsSevenZipAESEncryptionSettings

Děděné členy

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

Poznámky

AES-256 je jediná možná metoda šifrování pro archiv 7z. Takže Aspose.Zip.Saving.SevenZipAESEncryptionSettings je jediná implementace.

Konstruktor

SevenZipAESEncryptionSettings(string)

Inicializuje novou instanci třídy Aspose.Zip.Saving.SevenZipAESEncryptionSettings.

public SevenZipAESEncryptionSettings(string password)

Parametry

password string

Heslo pro šifrování nebo dešifrování.

Příklady

using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.7z");
}

SevenZipAESEncryptionSettings(SevenZipCipher)

Inicializuje novou instanci třídy Aspose.Zip.Saving.SevenZipAESEncryptionSettings s externím šifrovacím algoritmem.

public SevenZipAESEncryptionSettings(SevenZipCipher cipher)

Parametry

cipher SevenZipCipher

Vlastní implementace AES.

Příklady

SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.7z");
}
 Čeština