Class AesEcryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)
Classe de base pour les paramètres de plusieurs méthodes de chiffrement zip.
public class AesEcryptionSettings : EncryptionSettings
Héritage
object ← EncryptionSettings ← AesEcryptionSettings
Membres hérités
EncryptionSettings.Method, EncryptionSettings.Password, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarques
Voir plus à https://www.winzip.com/win/en/aes_info.html
Constructeurs
AesEcryptionSettings(string, EncryptionMethod)
Initialise une nouvelle instance de la classe Aspose.Zip.Saving.AesEcryptionSettings.
public AesEcryptionSettings(string password, EncryptionMethod method)
Paramètres
password
string
Mot de passe pour le chiffrement ou le déchiffrement.
method
EncryptionMethod
Option d’algorithme indiquant la taille de bloc du chiffrement.
Exemples
using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
archive.CreateEntry("data.bin", "data.bin");
archive.Save("archive.zip");
}
Exceptions
method
n’est pas l’une des options Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192, ou Aspose.Zip.Saving.EncryptionMethod.AES256.
AesEcryptionSettings(EncryptionMethod)
Initialise une nouvelle instance de la classe Aspose.Zip.Saving.AesEcryptionSettings sans mot de passe.
public AesEcryptionSettings(EncryptionMethod method)
Paramètres
method
EncryptionMethod
Option d’algorithme indiquant la taille de bloc du chiffrement.