Class SevenZipAESEncryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Klasa bazowa dla ustawień dla kilku metod szyfrowania 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Dziedziczenie
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Członkowie dziedziczeni
SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Uwagi
AES-256 jest jedyną możliwą metodą szyfrowania dla archiwum 7z. Dlatego Aspose.Zip.Saving.SevenZipAESEncryptionSettings jest jedyną implementacją.
Konstruktory
SevenZipAESEncryptionSettings(string)
Inicjalizuje nową instancję klasy Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Parametry
password
string
Hasło do szyfrowania lub deszyfrowania.
Przykłady
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
SevenZipAESEncryptionSettings(SevenZipCipher)
Inicjalizuje nową instancję klasy Aspose.Zip.Saving.SevenZipAESEncryptionSettings z zewnętrznym szyfrem.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parametry
cipher
SevenZipCipher
Niestandardowa implementacja AES.
Przykłady
SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}