Challenge class
Challenge server offers to the user to verify their identity.
This provides the user the minimum data needed from the server to generate the session key and its verifier.
Note: Custom hash functions must be passed in along with this challenge to User.fromUserCredsAndChallenge. Otherwise a runtime exception may occur, or if there is a built-in hash function with the same name it may be used instead of the custom hash function.
WARNING: If the server provides the core SRP parameters (safe prime, generator, hash algorithm) it is highly recommended for the client to verify they are cryptographically secure. This could include checking the hash algorithm is one of those permitted, and that the safe prime, generator and salt are secure (see verifySafePrime, verifyGenerator, verifySalt).
Constructors
- Challenge.fromServer({required BigInt generator, required BigInt safePrime, required Uint8List ephemeralServerPublicKey, required Uint8List verifierKeySalt, HashFunctionChoice? hashFunctionChoice, HashFunction? customHashFunction})
Properties
- ephemeralServerPublicKey → Uint8List
-
final
- generator → BigInt
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hashFunctionName → String
-
final
- isCustomHashFunction → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safePrime → BigInt
-
final
- verifierKeySalt → Uint8List
-
final
Methods
-
erase(
) → void - Securely overwrites all sensitive data with zeros.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this object to a JSON-serializable map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited