SevenZipAESEncryptionSettings

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

public class SevenZipAESEncryptionSettings extends SevenZipEncryptionSettings

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

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:**
| Parameter | Type | Description |
| --- | --- | --- |
| password | java.lang.String | password for encryption or decryption |

### SevenZipAESEncryptionSettings(SevenZipCipher cipher) {#SevenZipAESEncryptionSettings-com.aspose.zip.SevenZipCipher-}

public SevenZipAESEncryptionSettings(SevenZipCipher cipher)



Initializes a new instance of the [SevenZipAESEncryptionSettings](../../com.aspose.zip/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:**
| Parameter | Type | Description |
| --- | --- | --- |
| cipher | [SevenZipCipher](../../com.aspose.zip/sevenzipcipher) | custom AES implementation |