Class AesEcryptionSettings

Class AesEcryptionSettings

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

Базовый класс для настроек нескольких методов шифрования zip.

public class AesEcryptionSettings : EncryptionSettings

Наследование

objectEncryptionSettingsAesEcryptionSettings

Унаследованные члены

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

Примечания

См. подробнее на https://www.winzip.com/win/en/aes_info.html

Конструкторы

AesEcryptionSettings(string, EncryptionMethod)

Инициализирует новый экземпляр класса Aspose.Zip.Saving.AesEcryptionSettings.

public AesEcryptionSettings(string password, EncryptionMethod method)

Параметры

password string

Пароль для шифрования или расшифровки.

method EncryptionMethod

Опция алгоритма, указывающая размер блока шифра.

Примеры

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

Исключения

NotSupportedException

method не является одним из Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192 или Aspose.Zip.Saving.EncryptionMethod.AES256.

AesEcryptionSettings(EncryptionMethod)

Инициализирует новый экземпляр класса Aspose.Zip.Saving.AesEcryptionSettings без пароля.

public AesEcryptionSettings(EncryptionMethod method)

Параметры

method EncryptionMethod

Опция алгоритма, указывающая размер блока шифра.

 Русский