setRemotePublicKey method

void setRemotePublicKey(
  1. UdpAddress? udpAddress,
  2. RSAPublicKey publicKey,
  3. Uint8List nonce,
  4. Uint8List signature,
)

Implementation

void setRemotePublicKey(UdpAddress? udpAddress, RSAPublicKey publicKey,
    Uint8List nonce, Uint8List signature) {
  if (!nonces.check(nonce)) {
    return;
  }

  if (!rsaVerify(publicKey, nonce, signature)) {
    return;
  }

  print("setLANConnectionPoint for $remoteAddress is $udpAddress");

  lanConnectionPoint1 = udpAddress;
  remotePublicKey = publicKey;
}