Package com.aspose.zip
Class SevenZipAESEncryptionSettings
- java.lang.Object
-
- com.aspose.zip.SevenZipEncryptionSettings
-
- com.aspose.zip.SevenZipAESEncryptionSettings
-
public class SevenZipAESEncryptionSettings extends SevenZipEncryptionSettings
Settings for AES encryption or decryption algorithm within 7z archive.
-
-
Constructor Summary
Constructors Constructor Description SevenZipAESEncryptionSettings(SevenZipCipher cipher)Initializes a new instance of theSevenZipAESEncryptionSettingsclass with external cipher.SevenZipAESEncryptionSettings(String password)Initializes a new instance of theSevenZipAESEncryptionSettingsclass.
-
Method Summary
-
Methods inherited from class com.aspose.zip.SevenZipEncryptionSettings
getEncryptHeader, getPassword, setEncryptHeader, setPassword
-
-
-
-
Constructor Detail
-
SevenZipAESEncryptionSettings
public SevenZipAESEncryptionSettings(String password)
Initializes a new instance of the
SevenZipAESEncryptionSettingsclass.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
SevenZipAESEncryptionSettingsclass 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
-
-