Add the new hashes
This commit is contained in:
parent
5a5c8e7a58
commit
df10cc187e
|
@ -49,6 +49,7 @@ Miek Gieben - 2010, 2011 - miek@miek.nl
|
|||
* 4635 - HMAC SHA TSIG
|
||||
* 5001 - NSID
|
||||
* 5155 - NSEC
|
||||
* 5933 - GOST
|
||||
* 5936 - AXFR
|
||||
|
||||
## Loosely based upon:
|
||||
|
|
11
dnssec.go
11
dnssec.go
|
@ -33,9 +33,10 @@ const (
|
|||
// DNSSEC hashing codes.
|
||||
const (
|
||||
_ = iota
|
||||
HashSHA1
|
||||
HashSHA256
|
||||
HashGOST94
|
||||
HashSHA1 // RFC 4034
|
||||
HashSHA256 // RFC 4509
|
||||
HashGOST94 // RFC 5933
|
||||
HashSHA384 // Experimental
|
||||
)
|
||||
|
||||
// DNSKEY flags values.
|
||||
|
@ -146,6 +147,10 @@ func (k *RR_DNSKEY) ToDS(h int) *RR_DS {
|
|||
s := sha256.New()
|
||||
io.WriteString(s, string(digest))
|
||||
ds.Digest = hex.EncodeToString(s.Sum())
|
||||
case HashSHA384:
|
||||
s := sha512.New384()
|
||||
io.WriteString(s, string(digest))
|
||||
ds.Digest = hex.EncodeToString(s.Sum())
|
||||
case HashGOST94:
|
||||
/* I have no clue */
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue