예제 #1
0
            public I2NPHeader5(I2NPMessage msg) : base(msg.Header5Buf)
            {
                MessageRef = msg;

                MessageType = msg.MessageType;
                Expiration  = I2PDate.DefaultI2NPExpiration();
#if DEBUG
                DebugCheckMessageCreation(MessageRef);
#endif
            }
예제 #2
0
            public I2NPHeader16(I2NPMessage msg, uint messageid) : base(msg.Header16Buf)
            {
                MessageRef = msg;

                MessageType = msg.MessageType;
                Expiration  = I2PDate.DefaultI2NPExpiration();
                MessageId   = messageid;

                PayloadLength = (ushort)msg.Payload.Length;

                var s = I2PHashSHA256.GetHash(msg.Payload);

                PayloadChecksum = s[0];
#if DEBUG
                DebugCheckMessageCreation(MessageRef);
#endif
            }