Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ArchivePasswordException

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
273d35d5ba8a with working tree changes
Base
IOException
Implements
ISerializable
Modifiers
sealed

An encrypted archive member could not be opened: no password was supplied, or the supplied password does not open it.

Inheritance

  • IOException
  • ArchivePasswordException

Remarks

Derives from IOException, like ArchiveCorruptionException. Traditional ZipCrypto carries only a one-byte password check, so a wrong password can also surface after decoding, as a checksum mismatch; that case is reported here too, because it cannot be told apart from a damaged member.

Constructors

ArchivePasswordException 2 overloads
public ArchivePasswordException(string entryName, bool passwordSupplied, string message) #

Creates the exception for entryName.

Parameters

entryName string required
The member name as stored in the archive.
passwordSupplied bool required
Whether a password was supplied.
message string required
The error message.
public ArchivePasswordException(string entryName, bool passwordSupplied, string message, Exception? innerException) #

Creates the exception with the error that caused it.

Parameters

entryName string required
The member name as stored in the archive.
passwordSupplied bool required
Whether a password was supplied.
message string required
The error message.
innerException System.Exception? required
The error that caused this one, or null.

Properties

public string EntryName { get; } #

The member name as stored in the archive.

public bool PasswordSupplied { get; } #

True when a password was supplied but does not open the member; false when none was supplied.