hello method
This method is called to modify the hello details for a given realm.
Implementation
@override
Future<void> hello(String? realm, Details details) async {
_ensureUsable();
final cancellation = cancelPendingChallenge();
final generation = _attemptGeneration;
final random = Random.secure();
final nonceBytes = Uint8List.fromList(<int>[
for (var i = 0; i < 16; i++) random.nextInt(256),
]);
if (details.authid != null) {
details.authid = Saslprep.saslprep(details.authid!);
_authid = details.authid;
}
details.authextra ??= <String, dynamic>{};
details.authextra!['nonce'] = base64.encode(nonceBytes);
details.authextra!['channel_binding'] = null;
_helloNonce = details.authextra!['nonce'] as String;
_clear(nonceBytes);
await cancellation;
unawaited(
Future<void>.delayed(_challengeTimeout, () {
if (_attemptGeneration == generation) _helloNonce = null;
}),
);
}