Skip to content

SealedSetException

Namespace Nfty.Core.Publish in assembly Nfty.Core.

public sealed class SealedSetException : Exception

A sealed export could not be opened. One type for every reason, because the reasons are not distinguishable from outside the seal and pretending otherwise would be a lie about what the cryptography proved.

Remarks

A wrong passphrase and a tampered file fail identically, and must. The MAC and the frame tags are computed from a key derived from the passphrase, so a wrong passphrase produces a wrong key and every check fails — exactly as an edited file does under the right key. There is no computation that separates the two, and a message claiming to have separated them would be inventing a fact. The text says both.

Constructors

SealedSetException(string)

public SealedSetException(string message);

Creates the exception.

Parameters

  • message (string) - What to show the user, verbatim — ErrorReport prints it.

SealedSetException(string, Exception)

public SealedSetException(string message, Exception inner);

Creates the exception.

Parameters

  • message (string) - What to show the user, verbatim.
  • inner (Exception) - The underlying failure.

Methods

CannotOpen(string)

public static SealedSetException CannotOpen(string path);

The failure every authentication check reports.

Parameters

  • path (string) - The file that would not open.

Returns. The exception to throw.