documentation
This commit is contained in:
parent
e8b68c8621
commit
2de43f486f
5
nsec3.go
5
nsec3.go
|
@ -11,8 +11,9 @@ type saltWireFmt struct {
|
||||||
Salt string "size-hex"
|
Salt string "size-hex"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hash a string/label according to RFC5155.
|
// HashName hashes a string or label according to RFC5155. It returns
|
||||||
func hashName(label string, ha int, iterations int, salt string) string {
|
// the hashed string.
|
||||||
|
func HashName(label string, ha int, iterations int, salt string) string {
|
||||||
saltwire := new(saltWireFmt)
|
saltwire := new(saltWireFmt)
|
||||||
saltwire.Salt = salt
|
saltwire.Salt = salt
|
||||||
wire := make([]byte, DefaultMsgSize)
|
wire := make([]byte, DefaultMsgSize)
|
||||||
|
|
12
update.go
12
update.go
|
@ -65,9 +65,9 @@ func (u *Update) NameNotUsed(rr []RR) {
|
||||||
// RRsetUsedFull sets the RRs in the prereq section to
|
// RRsetUsedFull sets the RRs in the prereq section to
|
||||||
// "RRset exists (value dependent -- with rdata)" RRs. RFC 2136 section 2.4.2.
|
// "RRset exists (value dependent -- with rdata)" RRs. RFC 2136 section 2.4.2.
|
||||||
func (u *Update) RRsetUsedFull(rr []RR) {
|
func (u *Update) RRsetUsedFull(rr []RR) {
|
||||||
if len(u.Msg.Question) == 0 {
|
if len(u.Msg.Question) == 0 {
|
||||||
panic("empty question section")
|
panic("empty question section")
|
||||||
}
|
}
|
||||||
u.Answer = make([]RR, len(rr))
|
u.Answer = make([]RR, len(rr))
|
||||||
for i, r := range rr {
|
for i, r := range rr {
|
||||||
u.Answer[i] = r
|
u.Answer[i] = r
|
||||||
|
@ -110,9 +110,9 @@ func (u *Update) RRsetNotUsed(rr []RR) {
|
||||||
|
|
||||||
// RRsetAddFull adds an complete RRset, see RFC 2136 section 2.5.1
|
// RRsetAddFull adds an complete RRset, see RFC 2136 section 2.5.1
|
||||||
func (u *Update) RRsetAddFull(rr []RR) {
|
func (u *Update) RRsetAddFull(rr []RR) {
|
||||||
if len(u.Msg.Question) == 0 {
|
if len(u.Msg.Question) == 0 {
|
||||||
panic("empty question section")
|
panic("empty question section")
|
||||||
}
|
}
|
||||||
u.Ns = make([]RR, len(rr))
|
u.Ns = make([]RR, len(rr))
|
||||||
for i, r := range rr {
|
for i, r := range rr {
|
||||||
u.Ns[i] = r
|
u.Ns[i] = r
|
||||||
|
|
Loading…
Reference in New Issue