public override bool Encrypt(NetOutgoingMessage msg) { byte[] before = new byte[msg.LengthBytes]; msg.PeekBytes(msg.LengthBytes).CopyTo(before, 0); bool ans = base.Encrypt(msg); byte[] after = new byte[msg.LengthBytes]; msg.PeekBytes(msg.LengthBytes).CopyTo(after, 0); OnEncrypt?.Invoke(before, after); return(ans); }
public void SaveInnerMessage() { innerMessage.WritePadBits(); innerMessageBytes = innerMessage.PeekBytes(innerMessage.LengthBytes); //innerMessage = null; }