AesEcryptionSettings.AesEcryptionSettings

AesEcryptionSettings(string, EncryptionMethod)

初始化一个新的实例AesEcryptionSettings类.

public AesEcryptionSettings(string password, EncryptionMethod method)
范围类型描述
passwordString用于加密或解密的密码。
methodEncryptionMethod指示密码块大小的算法选项。

例外

例外(健康)状况
NotSupportedExceptionmethod不是其中之一AES128,AES192 , 或者AES256.

例子

using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.zip");
}

也可以看看


AesEcryptionSettings(EncryptionMethod)

初始化一个新的实例AesEcryptionSettings没有密码的类.

public AesEcryptionSettings(EncryptionMethod method)
范围类型描述
methodEncryptionMethod指示密码块大小的算法选项。

也可以看看