func (rd *TSIG) Encode(b *dns.Wirebuf) {
	dns.DomainName(rd.AlgorithmName).Encode(b)
	secs := rd.TimeSigned.UTC().Unix()
	for i := 0; i < 6; i++ {
		dns.Octet(secs >> 40).Encode(b)
		secs <<= 8
	}
	dns.Octets2(rd.Fudge / time.Second).Encode(b)
	dns.Octets2(len(rd.MAC)).Encode(b)
	b.Buf = append(b.Buf, rd.MAC...)
	dns.Octets2(rd.OriginalID).Encode(b)
	dns.Octets2(rd.Error).Encode(b)
	dns.Octets2(len(rd.OtherData)).Encode(b)
	b.Buf = append(b.Buf, rd.OtherData...)
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *TSIG) Encode(b *dns.Wirebuf) {
	dns.DomainName(rd.AlgorithmName).Encode(b)
	secs := rd.TimeSigned.UTC().Unix()
	for i := 0; i < 6; i++ {
		dns.Octet(secs >> 40).Encode(b)
		secs <<= 8
	}
	dns.Octets2(rd.Fudge / time.Second).Encode(b)
	dns.Octets2(len(rd.MAC)).Encode(b)
	b.Buf = append(b.Buf, rd.MAC...)
	dns.Octets2(rd.OriginalID).Encode(b)
	dns.Octets2(rd.Error).Encode(b)
	dns.Octets2(len(rd.OtherData)).Encode(b)
	b.Buf = append(b.Buf, rd.OtherData...)
}
func ( rd * TSIG ) Encode ( b * dns . Wirebuf ) { dns . DomainName ( rd . AlgorithmName ) . Encode ( b ) secs := rd . TimeSigned . UTC ( ) . Unix ( ) for i := 0 ; i < 6 ; i ++ { dns . Octet ( secs >> 40 ) . Encode ( b ) secs <<= 8 } dns . Octets2 ( rd . Fudge / time . Second ) . Encode ( b ) dns . Octets2 ( len ( rd . MAC ) ) . Encode ( b ) b . Buf = append ( b . Buf , rd . MAC ... ) dns . Octets2 ( rd . OriginalID ) . Encode ( b ) dns . Octets2 ( rd . Error ) . Encode ( b ) dns . Octets2 ( len ( rd . OtherData ) ) . Encode ( b ) b . Buf = append ( b . Buf , rd . OtherData ... ) }
Implementation of dns.Wirer
Implementation of dns . Wirer