Challenge.fromServer constructor

Challenge.fromServer({
  1. required BigInt generator,
  2. required BigInt safePrime,
  3. required Uint8List ephemeralServerPublicKey,
  4. required Uint8List verifierKeySalt,
  5. HashFunctionChoice? hashFunctionChoice,
  6. HashFunction? customHashFunction,
})

Implementation

Challenge.fromServer({
    required this.generator,
    required this.safePrime,
    required this.ephemeralServerPublicKey,
    required this.verifierKeySalt,
    HashFunctionChoice? hashFunctionChoice,
    HashFunction? customHashFunction,
}): hashFunctionName = customHashFunction?.name ?? hashFunctionChoice?.name ?? '',
    isCustomHashFunction = customHashFunction != null {
  if (hashFunctionChoice == null && customHashFunction == null) {
    throw InvalidParameterException('Either a hash function choice or custom hash function must be provided.');
  }
}