SevenZipAESEncryptionSettings
Inheritance: java.lang.Object, com.aspose.zip.SevenZipEncryptionSettings
public class SevenZipAESEncryptionSettings extends SevenZipEncryptionSettings
Settings for AES encryption or decryption algorithm.
Constructors
Constructor | Description |
---|---|
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)
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:
Parameter | Type | Description |
---|---|---|
cipher | SevenZipCipher | custom AES implementation |