Class AesEncryptionSettings


  • public class AesEncryptionSettings
    extends EncryptionSettings

    Settings for AES encryption and decryption algorithms within a ZIP archive.

    • Constructor Detail

      • AesEncryptionSettings

        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:
        password - Password for encryption or decryption.
        method - Algorithm option indicating block size of cipher.
        Throws:
        com.aspose.ms.System.NotSupportedException - method is not one of EncryptionMethod.AES128, EncryptionMethod.AES192, or EncryptionMethod.AES256.
      • AesEncryptionSettings

        public AesEncryptionSettings​(EncryptionMethod method)

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

        Parameters:
        method - Algorithm option indicating block size of cipher.