1package ntlmssp 2 3import ( 4 "bytes" 5) 6 7var signature = [8]byte{'N', 'T', 'L', 'M', 'S', 'S', 'P', 0} 8 9type messageHeader struct { 10 Signature [8]byte 11 MessageType uint32 12} 13 14func (h messageHeader) IsValid() bool { 15 return bytes.Equal(h.Signature[:], signature[:]) && 16 h.MessageType > 0 && h.MessageType < 4 17} 18 19func newMessageHeader(messageType uint32) messageHeader { 20 return messageHeader{signature, messageType} 21} 22