Fix the hashing

I mis applied the Gofix that created the correct fix.
This commit is contained in:
Miek Gieben 2011-12-16 15:08:44 +01:00
parent d1b0ee219f
commit e1ac8ae5cf
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package dns
import (
"crypto/sha1"
"hash"
"io"
"strings"
)
@ -37,7 +38,8 @@ func HashName(label string, ha int, iterations int, salt string) string {
// k = 0
name = append(name, wire...)
nsec3 := s.Sum(name)
io.WriteString(s, string(name))
nsec3 := s.Sum(nil)
// k > 0
for k := 0; k < iterations; k++ {
s.Reset()