Challenge.fromServer constructor
Challenge.fromServer({
- required BigInt generator,
- required BigInt safePrime,
- required Uint8List ephemeralServerPublicKey,
- required Uint8List verifierKeySalt,
- HashFunctionChoice? hashFunctionChoice,
- 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.');
}
}