SevenZipAESEncryptionSettings.SevenZipAESEncryptionSettings
SevenZipAESEncryptionSettings(string)
初始化一个新的实例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");
}
也可以看看
- class SevenZipAESEncryptionSettings
- 命名空间 Aspose.Zip.Saving
- 部件 Aspose.Zip
SevenZipAESEncryptionSettings(SevenZipCipher)
初始化一个新的实例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");
}
也可以看看
- class SevenZipCipher
- class SevenZipAESEncryptionSettings
- 命名空间 Aspose.Zip.Saving
- 部件 Aspose.Zip