private void SynchronizeCryptoMessage(NetworkIncomingMessage message) { HandshakeKey decryptor = keys.Remote.Clone(); byte[] synchronize = HandshakeCryptoPayload.GetVerification(); byte[] encrypted = decryptor.Encrypt(synchronize, 0, synchronize.Length); int offset = Bytes.Find(message.ToBytes(), encrypted); message.Acknowledge(offset); connection.Receive(MeasureCryptoMessage, HandshakeCryptoPayload.MinimumSize); }
public void Encrypt(DataBlock block) { key.Encrypt(block); }
public void ToBytes(DataBlock block) { inner.ToBytes(block); key.Encrypt(block); }