Class SevenZipAESEncryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Classe de base pour les paramètres de plusieurs méthodes de chiffrement 7z.
public class SevenZipAESEncryptionSettings : SevenZipEncryptionSettings
Héritage
object ← SevenZipEncryptionSettings ← SevenZipAESEncryptionSettings
Membres hérités
SevenZipEncryptionSettings.Password, SevenZipEncryptionSettings.EncryptHeader, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarques
L’AES-256 est la seule méthode de chiffrement possible pour les archives 7z. Ainsi, Aspose.Zip.Saving.SevenZipAESEncryptionSettings est la seule implémentation.
Constructeurs
SevenZipAESEncryptionSettings(string)
Initialise une nouvelle instance de la classe Aspose.Zip.Saving.SevenZipAESEncryptionSettings.
public SevenZipAESEncryptionSettings(string password)
Paramètres
password
string
Mot de passe pour le chiffrement ou le déchiffrement.
Exemples
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$"))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}
SevenZipAESEncryptionSettings(SevenZipCipher)
Initialise une nouvelle instance de la classe Aspose.Zip.Saving.SevenZipAESEncryptionSettings avec un chiffre externe.
public SevenZipAESEncryptionSettings(SevenZipCipher cipher)
Paramètres
cipher
SevenZipCipher
Implémentation AES personnalisée.
Exemples
SevenZipCipher cipher = ComposeMyCipher();
using (var archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.7z");
}