Class SevenZipAESEncryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
מחלקת בסיס עבור הגדרות עבור מספר שיטות הצפנה של 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
ירושה
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
חברים מורשים
SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
הערות
שיטת ההצפנה היחידה האפשרית עבור ארכיון 7z היא AES-256. לכן, 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 עם צופן חיצוני.
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");
}