protected virtual void OnParseBufferPart3(FFMsg_G2H msg, byte[] buffer, ref int offset) { msg.DataLength = buffer.GetValue <ushort>(offset, _parentParser.DataLength); offset += _parentParser.DataLength; msg.EntityData = buffer.GetValue <byte[]>(offset, msg.DataLength); offset += msg.DataLength; msg.Checksum = buffer.GetBytesToNumberUInt8(-1, 1); msg.ChecksumCalculated = FreeformHelper.CalculateCheckSum(buffer, 0, buffer.Length - 1); }
internal static byte MakeAuthenticationByte(List <byte> src) { return(FreeformHelper.CalculateCheckSum(src, 0, src.Count)); }
internal static byte MakeAuthenticationByte(byte[] src) { return(FreeformHelper.CalculateCheckSum(src)); }