Class SevenZipAESEncryptionSettings
Navne til: Aspose.Zip.Saving Sammensætning: Aspose.Zip.dll (25.5.0)
Basisklasse for indstillinger for flere 7z kryptering metoder.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Inheritance
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
De arvede medlemmer
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 er den eneste mulige kryptering metode for 7z arkiv. Så Aspose.Zip.Saving.SevenZipAESEncryptionSettings er den eneste implementering.
Constructors
SevenZipAESEncryptionSettings(String)
Start en ny instans af Aspose.Zip.Saving.SevenZipAESEncryptionSettings klasse.
public SevenZipAESEncryptionSettings(string password)
Parameters
password
string
Password til kryptering eller dekryptering.
Examples
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
SevenZipAESEncryptionSettings(SevenZipCipher)
Initialiserer en ny instans af Aspose.Zip.Saving.SevenZipAESEncryptionSettings klasse med ekstern cipher.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parameters
cipher
SevenZipCipher
Tilpasset implementering af 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");
}