updateExchangeHash method

void updateExchangeHash(
  1. Uint8List kS
)

Computes a new exchange hash exH given the server key kS.

Implementation

void updateExchangeHash(Uint8List kS) {
  exH = computeExchangeHash(server, kexMethod, kexHash, verC, verS, kexInitC,
      kexInitS, kS, K, dh, ecdh, x25519dh);

  /// The exchange hash H from the first key exchange is used as the session identifier.
  if (state == SSHTransportState.FIRST_KEXREPLY) sessionId = exH;

  if (tracePrint != null) {
    tracePrint('$hostport: H = "${hex.encode(exH)}"');
  }
}