Class AesEcryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Базовий клас для налаштувань для кількох методів шифрування zip.
public class AesEcryptionSettings : EncryptionSettings
Спадкування
object ← EncryptionSettings ← AesEcryptionSettings
Спадковані члени
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");
}
Виключення
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
Варіант алгоритму, що вказує розмір блоку шифру.