Interface IOutFeatureSetEncryptHeader

All Known Subinterfaces:
IOutCreateArchive7z, IOutUpdateArchive7z
All Known Implementing Classes:
OutArchive7zImpl

public interface IOutFeatureSetEncryptHeader
Feature interface for the setting 'encrypt header'. Use SevenZip.openOutArchive(ArchiveFormat) or one of the SevenZip.openOutArchiveXxx() methods to get implementation of this interface.
Since:
16.02-2.01
Author:
Boris Brodski
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setHeaderEncryption(boolean enabled)
    Enable/disable header encryption for password protected archives.
  • Method Details

    • setHeaderEncryption

      void setHeaderEncryption(boolean enabled) throws SevenZipException
      Enable/disable header encryption for password protected archives. If enabled, the archive header containing file names and other metadata will be encrypted as well.

      Note: Implement ICryptoGetTextPassword in your callback class to turn on the encryption.
      Parameters:
      enabled - true enable header encryption, otherwise false
      Throws:
      SevenZipException - in error case. If this method ends with an exception, the current operation will be reported to 7-Zip as failed. There is no guarantee that no further callback methods will be called. The first and last thrown exceptions will be saved and thrown later on from the originally called method such as IInArchive.extract() or SevenZip.openInArchive(). Up to four exceptions depending on the situation can be saved for further analysis. See SevenZipException and SevenZipException.printStackTraceExtended() for details.