AesEncryptionSettings

Inheritance: java.lang.Object, com.aspose.zip.EncryptionSettings

public class AesEncryptionSettings extends EncryptionSettings

Settings for AES encryption or decryption algorithm.

See more at https://www.winzip.com/win/en/aes_info.html

Constructors

ConstructorDescription
AesEncryptionSettings(String password, EncryptionMethod method)Initializes a new instance of the AesEncryptionSettings class.
AesEncryptionSettings(EncryptionMethod method)Initializes a new instance of the AesEncryptionSettings class without a password.

AesEncryptionSettings(String password, EncryptionMethod method)

public AesEncryptionSettings(String password, EncryptionMethod method)

Initializes a new instance of the AesEncryptionSettings class.


    try (Archive archive = new Archive(new ArchiveEntrySettings(null, new AesEncryptionSettings("p@s$", EncryptionMethod.AES256)))) {
        archive.createEntry("data.bin", "data.bin");
        archive.save("archive.zip");
    }
 

Parameters:

ParameterTypeDescription
passwordjava.lang.StringPassword for encryption or decryption.
methodEncryptionMethodAlgorithm option indicating block size of cipher.

AesEncryptionSettings(EncryptionMethod method)

public AesEncryptionSettings(EncryptionMethod method)

Initializes a new instance of the AesEncryptionSettings class without a password.

Parameters:

ParameterTypeDescription
methodEncryptionMethodAlgorithm option indicating block size of cipher.