Class TraditionalEncryptionSettings

Class TraditionalEncryptionSettings

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

Basis-Klasse für Einstellungen für mehrere ZIP-Verschlüsselungsmethoden.

public class TraditionalEncryptionSettings : EncryptionSettings

Vererbung

objectEncryptionSettingsTraditionalEncryptionSettings

Vererbte Mitglieder

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

Bemerkungen

Siehe Abschnitt 6.0 in der ZIP-Formatbeschreibung: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

Konstruktoren

TraditionalEncryptionSettings(string)

Initialisiert eine neue Instanz der Klasse Aspose.Zip.Saving.TraditionalEncryptionSettings.

public TraditionalEncryptionSettings(string password)

Parameter

password string

Passwort für die Verschlüsselung.

Beispiele

using (var archive = new Archive(new ArchiveEntrySettings(null, new TraditionalEncryptionSettings("p@s$"))))
{
    archive.CreateEntry("data.bin", "data.bin");
    archive.Save(zipFile);
}

TraditionalEncryptionSettings(string, Encoding)

Initialisiert eine neue Instanz der Klasse Aspose.Zip.Saving.TraditionalEncryptionSettings mit benutzerdefinierter Kodierung.

public TraditionalEncryptionSettings(string password, Encoding encoding)

Parameter

password string

Passwort für die Verschlüsselung.

encoding Encoding

Kodierung für Passwortzeichen.

Beispiele

using (var archive = new Archive(new ArchiveEntrySettings(null, new TraditionalEncryptionSettings("p£s$", System.Text.Encoding.ASCII))))
{
    archive.CreateEntry("data.bin", "data.bin");
    archive.Save(zipFile);
}

Bemerkungen

Die Verwendung dieses Konstruktors wird nicht empfohlen. Die Einstellung der Kodierung kann dem Standard widersprechen und ein inkompatibles Archiv erzeugen.

TraditionalEncryptionSettings()

Initialisiert eine neue Instanz der Klasse Aspose.Zip.Saving.TraditionalEncryptionSettings ohne Passwort.

public TraditionalEncryptionSettings()
 Deutsch