func Decode(data []byte, m *Message) error {
	if m == nil {
		return ErrDecodeToNil
	}
	m.Raw = append(m.Raw[:0], data...)
	return m.Decode()
}
Decode decodes Message from data to m, returning error if any.
package stun
import (
	"crypto/rand"
	"encoding/base64"
	"errors"
	"fmt"
	"io"
)
const (
	magicCookie         = 0x2112A442
	attributeHeaderSize = 4
	messageHeaderSize   = 20
	TransactionIDSize = 12  
)
func NewTransactionID() (b [TransactionIDSize]byte) {
	readFullOrPanic(rand.Reader, b[:])
	return b
}
func IsMessage(b []byte) bool {
	return len(b) >= messageHeaderSize && bin.Uint32(b[4:8]) == magicCookie
}
func New() *Message {
	const defaultRawCapacity = 120
	return &Message{
		Raw: make([]byte, messageHeaderSize, defaultRawCapacity),
	}
}
var ErrDecodeToNil = errors.New("attempt to decode to nil message")