Class SevenZipAESEncryptionSettings

Class SevenZipAESEncryptionSettings

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

คลาสฐานสำหรับการตั้งค่าสำหรับหลายวิธีการเข้ารหัส 7z

public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings

การสืบทอด

objectSevenZipEncryptionSettingsSevenZipAESEncryptionSettings

สมาชิกที่สืบทอด

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 พร้อมกับ cipher ภายนอก

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");
}
 แบบไทย