Table of Contents

Enum TwoFactorRecoveryReadResult

Namespace
FishMMO.Client.Security
Assembly
FishMMO.Client.dll

The outcome of an attempt to open a recovery-code envelope.

public enum TwoFactorRecoveryReadResult

Fields

Empty = 1

No data was supplied (null/empty blob).

LegacyPlaintext = 2

The blob is not an envelope at all — it is the old, unencrypted payload this class replaces. The caller can read it directly and should migrate it.

Malformed = 3

The blob claims to be an envelope but its header is unusable: truncated, a future format version, an unknown KDF, or lengths that do not add up.

Success = 0

The envelope opened and the plaintext is available.

WrongPasswordOrTampered = 4

The header parsed, but the AEAD tag did not verify. Either the password is wrong or the file was tampered with; AES-GCM cannot tell those two apart and neither can we. The file must not be deleted on this result.

Remarks

These are deliberately distinct values rather than a bool. "There is nothing stored", "the password is wrong", "somebody edited the file" and "this is an old plaintext file" all demand different handling, and collapsing them into a failure flag is how a caller ends up deleting a perfectly good envelope because the player fat-fingered a password.