aboutsummaryrefslogtreecommitdiff
path: root/trillian/util.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-06 15:59:35 +0200
commit47bacfd5c5d22470340e0823c4ad37b45914b68e (patch)
tree0984b55ced1e537e8d1d681c77157f1a47e47cdc /trillian/util.go
parent0285454c34b0b3003bc8ede3e304b843ad949be8 (diff)
started using the refactored packages in siglog server
Diffstat (limited to 'trillian/util.go')
-rw-r--r--trillian/util.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/trillian/util.go b/trillian/util.go
deleted file mode 100644
index 87e64b6..0000000
--- a/trillian/util.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package trillian
-
-import (
- "fmt"
-
- trillian "github.com/google/trillian/types"
- siglog "github.com/system-transparency/stfe/types"
-)
-
-func treeHeadFromLogRoot(lr *trillian.LogRootV1) *siglog.TreeHead {
- var hash [siglog.HashSize]byte
- th := siglog.TreeHead{
- Timestamp: uint64(lr.TimestampNanos / 1000 / 1000 / 1000),
- TreeSize: uint64(lr.TreeSize),
- RootHash: &hash,
- }
- copy(th.RootHash[:], lr.RootHash)
- return &th
-}
-
-func nodePathFromHashes(hashes [][]byte) ([]*[siglog.HashSize]byte, error) {
- var path []*[siglog.HashSize]byte
- for _, hash := range hashes {
- if len(hash) != siglog.HashSize {
- return nil, fmt.Errorf("unexpected hash length: %v", len(hash))
- }
-
- var h [siglog.HashSize]byte
- copy(h[:], hash)
- path = append(path, &h)
- }
- return path, nil
-}