Class SevenZipAESEncryptionSettings
Nom dels espais: Aspose.Zip.Saving Assemblea: Aspose.Zip.dll (25.5.0)
Classes de base per a les configuracions per a diversos mètodes de xifració 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Inheritance
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Membres heretats
SevenZipEncryptionSettings.Password , SevenZipEncryptionSettings.EncryptHeader , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Remarks
L’AES-256 és l’únic mètode de xifra possible per a l’arxiu 7z. Per tant, l’Aspose.Zip.Saving.SevenZipAESEncryptionSettings és l’única implementaci.
Constructors
7CriptacióSettings(Tàrrega)
Inicia una nova instància de la classe Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Parameters
password
string
Password per a la xifració o decrypci.
Examples
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
7CriptacióSettings(SevenZipCipher)
Inicialitza una nova instància de la classe Aspose.Zip.Saving.SevenZipAESEncryptionSettings amb xifra externa.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Parameters
cipher
SevenZipCipher
Implementació de l’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");
}