Class SevenZipAESEncryptionSettings
Tên không gian: Aspose.Zip.Saving Tổng hợp: Aspose.Zip.dll (25.5.0)
Khóa học cơ bản cho các cài đặt cho một số phương pháp mã hóa 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Inheritance
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Thành viên thừa kế
SevenZipEncryptionSettings.Password , SevenZipEncryptionSettings.EncryptHeader , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Remarks
AES-256 là phương pháp mã hóa duy nhất có thể cho lưu trữ 7z. Vì vậy Aspose.Zip.Saving.SevenZipAESEncryptionSettings là thực hiện duy nhất.
Constructors
7Những cài đặt mã hóa(String)
Bắt đầu một trường hợp mới của lớp Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Parameters
password
string
mật khẩu cho mã hóa hoặc decryption.
Examples
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
7Những cài đặt mã hóa(SevenZipCipher)
Bắt đầu một trường hợp mới của lớp Aspose.Zip.Saving.SevenZipAESEncryptionSettings với chip bên ngoài.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parameters
cipher
SevenZipCipher
Thực hiện tùy chỉnh AES.
Examples
SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}