Class SevenZipAESEncryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Базовый класс для настроек нескольких методов шифрования 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Наследование
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Унаследованные члены
SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Замечания
AES-256 является единственным возможным методом шифрования для архива 7z. Поэтому Aspose.Zip.Saving.SevenZipAESEncryptionSettings — это единственная реализация.
Конструкторы
SevenZipAESEncryptionSettings(string)
Инициализирует новый экземпляр класса Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Параметры
password
string
Пароль для шифрования или расшифровки.
Примеры
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
SevenZipAESEncryptionSettings(SevenZipCipher)
Инициализирует новый экземпляр класса Aspose.Zip.Saving.SevenZipAESEncryptionSettings с внешним шифром.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Параметры
cipher
SevenZipCipher
Пользовательская реализация AES.
Примеры
SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}