public void Exchange(long keySend, long keyRecv, out long modpowerSend, out long modpowerRecv) { lock (this) { uint keyForSend = (uint)DH.DHKey(secretSend, keyRecv); uint keyForRecv = (uint)DH.DHKey(secretRecv, keySend); pikeSend = new Pike(keyForSend); pikeRecv = new Pike(keyForRecv); modpowerSend = this.modpowerSend; modpowerRecv = this.modpowerRecv; } }