Class SevenZipAESEncryptionSettings


  • public class SevenZipAESEncryptionSettings
    extends SevenZipEncryptionSettings

    Settings for AES encryption or decryption algorithm within 7z archive.

    • Constructor Detail

      • SevenZipAESEncryptionSettings

        public SevenZipAESEncryptionSettings​(String password)

        Initializes a new instance of the SevenZipAESEncryptionSettings class.

        
            try (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$")))) {
                archive.createEntry("data.bin", "data.bin");
                archive.save("archive.7z");
            }
         
        Parameters:
        password - password for encryption or decryption
      • SevenZipAESEncryptionSettings

        public SevenZipAESEncryptionSettings​(SevenZipCipher cipher)

        Initializes a new instance of the SevenZipAESEncryptionSettings class with external cipher.

        
            SevenZipCipher cipher = composeMyCipher();
            try (SevenZipArchive archive = new SevenZipArchive(new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings(cipher)))) {
                archive.createEntry("data.bin", "data.bin");
                archive.save("archive.7z");
            }
         
        Parameters:
        cipher - custom AES implementation