ScramAuthentication.fromClientKey constructor
ScramAuthentication.fromClientKey(
- Uint8List clientKey, {
- required Uint8List serverKey,
- required ScramKeyCacheBinding binding,
- Duration? challengeTimeout,
- Duration derivationTimeout = const Duration(seconds: 30),
- ScramKeyDeriver? keyDeriver,
Implementation
ScramAuthentication.fromClientKey(
Uint8List clientKey, {
required Uint8List serverKey,
required ScramKeyCacheBinding binding,
Duration? challengeTimeout,
Duration derivationTimeout = const Duration(seconds: 30),
ScramKeyDeriver? keyDeriver,
}) : stringEncoding = binding.stringEncoding,
_reuseClientKey = true,
_keyDeriver = keyDeriver ?? ScramKeyDeriver(),
_ownsKeyDeriver = keyDeriver == null,
_derivationTimeout = derivationTimeout,
_clientKey = Uint8List.fromList(clientKey),
_serverKey = Uint8List.fromList(serverKey),
_keyFingerprint = binding.fingerprint {
if (challengeTimeout != null) _challengeTimeout = challengeTimeout;
_firstClientKeyCompleter.complete(Uint8List.fromList(_clientKey!));
}