From 8d097316c0a12f14de4b9e27e1fe4c458c32f4b0 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sat, 21 May 2022 20:31:09 +0200 Subject: use hashing from merkle package --- internal/fmtio/fmtio.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/fmtio') diff --git a/internal/fmtio/fmtio.go b/internal/fmtio/fmtio.go index f900e42..84b1265 100644 --- a/internal/fmtio/fmtio.go +++ b/internal/fmtio/fmtio.go @@ -10,6 +10,7 @@ import ( "os" "git.sigsum.org/sigsum-go/pkg/hex" + "git.sigsum.org/sigsum-go/pkg/merkle" "git.sigsum.org/sigsum-go/pkg/types" ) @@ -54,12 +55,12 @@ func PublicKeyFromHex(s string) (pub types.PublicKey, err error) { return } -func KeyHashFromHex(s string) (h types.Hash, err error) { +func KeyHashFromHex(s string) (h merkle.Hash, err error) { b, err := hex.Deserialize(s) if err != nil { return h, err } - if n := len(b); n != types.HashSize { + if n := len(b); n != merkle.HashSize { return h, fmt.Errorf("invalid size %d", n) } copy(h[:], b) -- cgit v1.2.3