Class AesEcryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
多个 zip 加密方法设置的基类。
public class AesEcryptionSettings : EncryptionSettings
继承
object ← EncryptionSettings ← AesEcryptionSettings
继承成员
EncryptionSettings.Method, EncryptionSettings.Password, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
备注
更多信息请见 https://www.winzip.com/win/en/aes_info.html
构造函数
AesEcryptionSettings(string, EncryptionMethod)
初始化 Aspose.Zip.Saving.AesEcryptionSettings 类的新实例。
public AesEcryptionSettings(string password, EncryptionMethod method)
参数
password
string
用于加密或解密的密码。
method
EncryptionMethod
指示密码块大小的算法选项。
示例
using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.zip");
}
异常
method
不是 Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192, 或 Aspose.Zip.Saving.EncryptionMethod.AES256 中的一个。
AesEcryptionSettings(EncryptionMethod)
初始化 Aspose.Zip.Saving.AesEcryptionSettings 类的新实例,无需密码。
public AesEcryptionSettings(EncryptionMethod method)
参数
method
EncryptionMethod
指示密码块大小的算法选项。