Package com.aspose.zip
Class AesEncryptionSettings
- java.lang.Object
-
- com.aspose.zip.EncryptionSettings
-
- com.aspose.zip.AesEncryptionSettings
-
public class AesEncryptionSettings extends EncryptionSettings
Settings for AES encryption and decryption algorithms within a ZIP archive.
-
-
Constructor Summary
Constructors Constructor Description AesEncryptionSettings(EncryptionMethod method)Initializes a new instance of theAesEncryptionSettingsclass without a password.AesEncryptionSettings(String password, EncryptionMethod method)Initializes a new instance of theAesEncryptionSettingsclass.
-
Method Summary
-
Methods inherited from class com.aspose.zip.EncryptionSettings
getMethod, getPassword, setPassword
-
-
-
-
Constructor Detail
-
AesEncryptionSettings
public AesEncryptionSettings(String password, EncryptionMethod method)
Initializes a new instance of the
AesEncryptionSettingsclass.try (Archive archive = new Archive(new ArchiveEntrySettings(null, new AesEncryptionSettings("p@s$", EncryptionMethod.AES256)))) { archive.createEntry("data.bin", "data.bin"); archive.save("archive.zip"); }- Parameters:
password- Password for encryption or decryption.method- Algorithm option indicating block size of cipher.- Throws:
com.aspose.ms.System.NotSupportedException-methodis not one ofEncryptionMethod.AES128,EncryptionMethod.AES192, orEncryptionMethod.AES256.
-
AesEncryptionSettings
public AesEncryptionSettings(EncryptionMethod method)
Initializes a new instance of the
AesEncryptionSettingsclass without a password.- Parameters:
method- Algorithm option indicating block size of cipher.
-
-