Class AesEcryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Lớp cơ sở cho các cài đặt cho nhiều phương pháp mã hóa zip.
public class AesEcryptionSettings : EncryptionSettings
Kế thừa
object ← EncryptionSettings ← AesEcryptionSettings
Các thành viên kế thừa
EncryptionSettings.Method, EncryptionSettings.Password, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Nhận xét
Xem thêm tại https://www.winzip.com/win/en/aes_info.html
Các hàm khởi tạo
AesEcryptionSettings(string, EncryptionMethod)
Khởi tạo một thể hiện mới của lớp Aspose.Zip.Saving.AesEcryptionSettings.
public AesEcryptionSettings(string password, EncryptionMethod method)
Tham số
password
string
Mật khẩu để mã hóa hoặc giải mã.
method
EncryptionMethod
Tùy chọn thuật toán chỉ định kích thước khối của cipher.
Ví dụ
using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.zip");
}
Ngoại lệ
method
không phải là một trong những Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192, hoặc Aspose.Zip.Saving.EncryptionMethod.AES256.
AesEcryptionSettings(EncryptionMethod)
Khởi tạo một thể hiện mới của lớp Aspose.Zip.Saving.AesEcryptionSettings mà không cần mật khẩu.
public AesEcryptionSettings(EncryptionMethod method)
Tham số
method
EncryptionMethod
Tùy chọn thuật toán chỉ định kích thước khối của cipher.