SrpState - jimdroberts/FishMMO GitHub Wiki

Description

Represents the current state of the Secure Remote Password (SRP) authentication process on the server in FishMMO. Used to track the progress of SRP handshakes.


API Access

Fields

  • SrpVerify

    The server is verifying the client's SRP parameters.

  • SrpProof

    The server is processing the client's proof and generating its own proof.

  • SrpSuccess

    The SRP authentication process has completed successfully.


Basic Usage

Setup

  1. Use SrpState to track and manage the current step of the SRP authentication process.
  2. Assign or check the enum value as needed in authentication logic to handle state transitions.

Example

// Example 1: Checking SRP state
if (srpData.State == SrpState.SrpProof)
{
    // Handle proof verification logic
}

// Example 2: Setting SRP state
srpData.State = SrpState.SrpSuccess;

Best Practices

  • Use this enum to clearly define and manage SRP authentication states.
  • Update the state appropriately during each step of the SRP handshake.
  • Avoid using magic numbers; always use the named enum values for clarity.
⚠️ **GitHub.com Fallback** ⚠️