From 53e58a58b1a1f9d956d0bdd298419d78f24ced92 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 28 Mar 2022 18:56:41 +0200 Subject: remove redundant characters --- pkg/types/tree_head.go | 2 +- pkg/types/tree_head_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/types/tree_head.go b/pkg/types/tree_head.go index b0214ca..2ddeb08 100644 --- a/pkg/types/tree_head.go +++ b/pkg/types/tree_head.go @@ -37,7 +37,7 @@ func (th *TreeHead) toBinary() []byte { } func (th *TreeHead) ToBinary(keyHash *Hash) []byte { - namespace := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize((*keyHash)[:])) // length 88 + namespace := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize(keyHash[:])) // length 88 b := make([]byte, 6+4+88+4+0+4+6+4+HashSize) copy(b[0:6], "SSHSIG") diff --git a/pkg/types/tree_head_test.go b/pkg/types/tree_head_test.go index 678b935..746820a 100644 --- a/pkg/types/tree_head_test.go +++ b/pkg/types/tree_head_test.go @@ -188,7 +188,7 @@ func validTreeHead(t *testing.T) *TreeHead { } func validTreeHeadBytes(t *testing.T, keyHash *Hash) []byte { - ns := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize((*keyHash)[:])) + ns := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize(keyHash[:])) th := bytes.Join([][]byte{ []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01}, -- cgit v1.2.3