Class AesEcryptionSettings
Namespace: Aspose.Zip.Saving
Assembly: Aspose.Zip.dll (25.2.0)
Base class for settings for several zip encryption methods.
public class AesEcryptionSettings : EncryptionSettings
Inheritance
object ← EncryptionSettings ← AesEcryptionSettings
Inherited Members
EncryptionSettings.Method, EncryptionSettings.Password, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
See more at https://www.winzip.com/win/en/aes_info.html
Constructors
AesEcryptionSettings(string, EncryptionMethod)
Initializes a new instance of the Aspose.Zip.Saving.AesEcryptionSettings class.
public AesEcryptionSettings(string password, EncryptionMethod method)
Parameters
password
string
Password for encryption or decryption.
method
EncryptionMethod
Algorithm option indicating block size of cipher.
Examples
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
is not one of Aspose.Zip.Saving.EncryptionMethod.AES128, Aspose.Zip.Saving.EncryptionMethod.AES192, or Aspose.Zip.Saving.EncryptionMethod.AES256.
AesEcryptionSettings(EncryptionMethod)
Initializes a new instance of the Aspose.Zip.Saving.AesEcryptionSettings class without a password.
public AesEcryptionSettings(EncryptionMethod method)
Parameters
method
EncryptionMethod
Algorithm option indicating block size of cipher.