dns/nsec3_test.go

20 lines
354 B
Go
Raw Normal View History

2011-03-08 08:47:20 +11:00
package dns
import (
"testing"
)
func TestPackNsec3(t *testing.T) {
nsec3 := hashName("dnsex.nl", SHA1, 0, "DEAD")
2011-07-06 04:01:17 +10:00
if nsec3 != "ROCCJAE8BJJU7HN6T7NG3TNM8ACRS87J" {
t.Logf("%v\n", nsec3)
t.Fail()
}
2011-03-10 00:27:41 +11:00
nsec3 = hashName("a.b.c.example.org", SHA1, 2, "DEAD")
2011-07-06 04:01:17 +10:00
if nsec3 != "6LQ07OAHBTOOEU2R9ANI2AT70K5O0RCG" {
t.Logf("%v\n", nsec3)
t.Fail()
}
2011-03-08 08:47:20 +11:00
}