Class AesEcryptionSettings

Class AesEcryptionSettings

Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.1.0)

Classe base per le impostazioni di diversi metodi di crittografia zip.

public class AesEcryptionSettings : EncryptionSettings

Ereditarietà

objectEncryptionSettingsAesEcryptionSettings

Membri Ereditati

EncryptionSettings.Method, EncryptionSettings.Password, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Osservazioni

Vedi di più su https://www.winzip.com/win/en/aes_info.html

Costruttori

AesEcryptionSettings(string, EncryptionMethod)

Inizializza una nuova istanza della classe Aspose.Zip.Saving.AesEcryptionSettings.

public AesEcryptionSettings(string password, EncryptionMethod method)

Parametri

password string

Password per la crittografia o la decrittografia.

method EncryptionMethod

Opzione dell’algoritmo che indica la dimensione del blocco del cifrario.

Esempi

using (var archive = new Archive(new ArchiveEntrySettings(null, new AesEcryptionSettings("p@s$", EncryptionMethod.AES256))))
{
   archive.CreateEntry("data.bin", "data.bin");
   archive.Save("archive.zip");
}

Eccezioni

NotSupportedException

method non è uno dei seguenti: Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192, o Aspose.Zip.Saving.EncryptionMethod.AES256.

AesEcryptionSettings(EncryptionMethod)

Inizializza una nuova istanza della classe Aspose.Zip.Saving.AesEcryptionSettings senza una password.

public AesEcryptionSettings(EncryptionMethod method)

Parametri

method EncryptionMethod

Opzione dell’algoritmo che indica la dimensione del blocco del cifrario.

 Italiano