AesEncryptionSettings
Inheritance: java.lang.Object, com.aspose.zip.EncryptionSettings
public class AesEncryptionSettings extends EncryptionSettings
Settings for AES encryption or decryption algorithm.
See more at https://www.winzip.com/win/en/aes_info.html
Constructors
Constructor | Description |
---|---|
AesEncryptionSettings(String password, EncryptionMethod method) | Initializes a new instance of the AesEncryptionSettings class. |
AesEncryptionSettings(EncryptionMethod method) | Initializes a new instance of the AesEncryptionSettings class without a password. |
AesEncryptionSettings(String password, EncryptionMethod method)
public AesEncryptionSettings(String password, EncryptionMethod method)
Initializes a new instance of the AesEncryptionSettings class.
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:
Parameter | Type | Description |
---|---|---|
password | java.lang.String | Password for encryption or decryption. |
method | EncryptionMethod | Algorithm option indicating block size of cipher. |
AesEncryptionSettings(EncryptionMethod method)
public AesEncryptionSettings(EncryptionMethod method)
Initializes a new instance of the AesEncryptionSettings class without a password.
Parameters:
Parameter | Type | Description |
---|---|---|
method | EncryptionMethod | Algorithm option indicating block size of cipher. |