AesEncryptionSettings
Inheritance: java.lang.Object, com.aspose.zip.EncryptionSettings
public class AesEncryptionSettings extends EncryptionSettings
Inställningar för AES-krypterings- och dekrypteringsalgoritmer i ett ZIP-arkiv.
Konstruktörer
| Konstruktor | Beskrivning |
|---|---|
| AesEncryptionSettings(String password, EncryptionMethod method) | Initierar en ny instans av klassen AesEncryptionSettings. |
| AesEncryptionSettings(EncryptionMethod method) | Initierar en ny instans av klassen AesEncryptionSettings utan ett lösenord. |
AesEncryptionSettings(String password, EncryptionMethod method)
public AesEncryptionSettings(String password, EncryptionMethod method)
Initierar en ny instans av klassen AesEncryptionSettings.
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](../../com.aspose.zip/encryptionmethod) | Algorithm option indicating block size of cipher. |
### AesEncryptionSettings(EncryptionMethod method) {#AesEncryptionSettings-com.aspose.zip.EncryptionMethod-}
public AesEncryptionSettings(EncryptionMethod method)
Initializes a new instance of the [AesEncryptionSettings](../../com.aspose.zip/aesencryptionsettings) class without a password.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| method | [EncryptionMethod](../../com.aspose.zip/encryptionmethod) | Algorithm option indicating block size of cipher. |