toJson method
Converts this object to a JSON-serializable map.
Binary data is encoded as base64 strings, and BigInt values are encoded as decimal strings for safe transmission over JSON.
Example:
final json = challenge.toJson();
final jsonString = jsonEncode(json); // Serialize to JSON string
Implementation
Map<String, dynamic> toJson() => {
'generator': generator.toString(),
'safePrime': safePrime.toString(),
'ephemeralServerPublicKey': base64.encode(ephemeralServerPublicKey),
'verifierKeySalt': base64.encode(verifierKeySalt),
'hashFunctionName': hashFunctionName,
'isCustomHashFunction': isCustomHashFunction,
};