Class SevenZipAESEncryptionSettings
Class SevenZipAESEncryptionSettings
名称: Aspose.Zip.Saving 收藏: Aspose.Zip.dll (25.5.0)
对多个 7z 加密方法的设置的基础类。
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Inheritance
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()
Remarks
AES-256 是 7z 存档的唯一可能加密方法,因此 Aspose.Zip.Saving.SevenZipAESEncryptionSettings 是唯一的实施。
Constructors
7ZipAESEncryption设置(线条)
启动 Aspose.Zip.Saving.SevenZipAESEncryptionSettings 类的新例子。
public SevenZipAESEncryptionSettings(string password)
Parameters
password
string
密码加密或解密。
Examples
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
7ZipAESEncryption设置(SevenZipCipher)
启动一个新的例子 Aspose.Zip.Saving.SevenZipAESEncryptionSettings 类与外部芯片。
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parameters
cipher
SevenZipCipher
定制 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");
}