copyWith method

HandshakeState copyWith({
  1. Uint8List? chainKey,
  2. Uint8List? handshakeHash,
  3. XXHandshakeState? state,
  4. SecretKey? cipherKey,
  5. bool clearCipherKey = false,
  6. int? cipherNonce,
  7. SecretKey? sendKey,
  8. SecretKey? recvKey,
  9. Uint8List? remoteEphemeralKey,
  10. Uint8List? remoteStaticKey,
})

Implementation

HandshakeState copyWith({
  Uint8List? chainKey,
  Uint8List? handshakeHash,
  XXHandshakeState? state,
  SecretKey? cipherKey,
  bool clearCipherKey = false,
  int? cipherNonce,
  SecretKey? sendKey,
  SecretKey? recvKey,
  Uint8List? remoteEphemeralKey,
  Uint8List? remoteStaticKey,
}) {
  return HandshakeState(
    chainKey: chainKey ?? this.chainKey,
    handshakeHash: handshakeHash ?? this.handshakeHash,
    state: state ?? this.state,
    cipherKey: clearCipherKey ? null : (cipherKey ?? this.cipherKey),
    cipherNonce: cipherNonce ?? this.cipherNonce,
    sendKey: sendKey ?? this.sendKey,
    recvKey: recvKey ?? this.recvKey,
    remoteEphemeralKey: remoteEphemeralKey ?? this.remoteEphemeralKey,
    remoteStaticKey: remoteStaticKey ?? this.remoteStaticKey,
  );
}