ScramAuthentication.fromClientKey constructor

ScramAuthentication.fromClientKey(
  1. Uint8List clientKey, {
  2. required Uint8List serverKey,
  3. required ScramKeyCacheBinding binding,
  4. Duration? challengeTimeout,
  5. Duration derivationTimeout = const Duration(seconds: 30),
  6. 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!));
}