step1 method

void step1(
  1. String? userID,
  2. String? password
)

Implementation

void step1(final String? userID, final String? password) {
  if (userID == null || userID.trim().isEmpty) {
    throw IllegalArgumentException(
        "The user identity 'I' must not be null or empty");
  }

  this.userID = userID;

  if (password == null) {
    throw IllegalArgumentException(
        "The user password 'P' must not be null");
  }

  this.password = password;

  // Check current state
  if (state != SrpState.init) {
    throw IllegalStateException(
        "State violation: Session must be in INIT state");
  }

  state = SrpState.step1;

  updateLastActivityTime();
}