SevenZipAESEncryptionSettings

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

public class SevenZipAESEncryptionSettings extends SevenZipEncryptionSettings

Settings for AES encryption or decryption algorithm.

Constructors

ConstructorDescription
SevenZipAESEncryptionSettings(String password)Initializes a new instance of the SevenZipAESEncryptionSettings class.
SevenZipAESEncryptionSettings(SevenZipCipher cipher)Initializes a new instance of the SevenZipAESEncryptionSettings class with external cipher.

SevenZipAESEncryptionSettings(String password)

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:

ParameterTypeDescription
passwordjava.lang.Stringpassword for encryption or decryption

SevenZipAESEncryptionSettings(SevenZipCipher cipher)

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:

ParameterTypeDescription
cipherSevenZipCiphercustom AES implementation