Package com.aspose.zip
Class TraditionalEncryptionSettings
- java.lang.Object
-
- com.aspose.zip.EncryptionSettings
-
- com.aspose.zip.TraditionalEncryptionSettings
-
public class TraditionalEncryptionSettings extends EncryptionSettings
Settings for traditional ZipCrypto algorithm within a ZIP archive.
See section 6.0 at ZIP format description: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
-
-
Constructor Summary
Constructors Constructor Description TraditionalEncryptionSettings()Initializes a new instance of theTraditionalEncryptionSettingsclass without a password.TraditionalEncryptionSettings(String password)Initializes a new instance of theTraditionalEncryptionSettingsclass.TraditionalEncryptionSettings(String password, Charset encoding)Initializes a new instance of theTraditionalEncryptionSettingsclass with user defined encoding.
-
Method Summary
-
Methods inherited from class com.aspose.zip.EncryptionSettings
getMethod, getPassword, setPassword
-
-
-
-
Constructor Detail
-
TraditionalEncryptionSettings
public TraditionalEncryptionSettings(String password)
Initializes a new instance of the
TraditionalEncryptionSettingsclass.try (Archive archive = new Archive(new ArchiveEntrySettings(null, new TraditionalEncryptionSettings("p@s$")))) { archive.createEntry("data.bin", "data.bin"); archive.save(zipFile); }- Parameters:
password- Password for encryption.
-
TraditionalEncryptionSettings
public TraditionalEncryptionSettings(String password, Charset encoding)
Initializes a new instance of the
TraditionalEncryptionSettingsclass with user defined encoding.try (Archive archive = new Archive(new ArchiveEntrySettings(null, new TraditionalEncryptionSettings("p£s$", StandardCharsets.US_ASCII)))) { archive.createEntry("data.bin", "data.bin"); archive.save(zipFile); }Usage of this constructor is discouraged. Setting the encoding may contradict the standard and produce incompatible archive.
- Parameters:
password- Password for encryption.encoding- Encoding for password characters.
-
TraditionalEncryptionSettings
public TraditionalEncryptionSettings()
Initializes a new instance of the
TraditionalEncryptionSettingsclass without a password.
-
-