public Tlv(ushort tlvCommand, TlvBody tlvBody, byte[] cryptKey) : base() { _tlvCommand = tlvCommand; _tlvBody = tlvBody; PutUshortBE(tlvCommand); EnterBarrierEncrypted(Prefix.Uint16, Endian.Big, TeaCryptor.Instance, cryptKey); { PutPacket(tlvBody); } LeaveBarrier(); }
public Tlv(ushort tlvCommand, TlvBody tlvBody) : base() { _tlvCommand = tlvCommand; _tlvBody = tlvBody; PutUshortBE(tlvCommand); EnterBarrier(Prefix.Uint16, Endian.Big); { PutPacket(tlvBody); } LeaveBarrier(); }
public Tlv(ushort tlvCommand, byte[] data) : base(null) { _tlvCommand = tlvCommand; _tlvBodyLength = (ushort)data.Length; _tlvBody = TlvBody.FromBuffer(tlvCommand, data); }