aboutsummaryrefslogtreecommitdiff
path: root/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 /util.go
parent0285454c34b0b3003bc8ede3e304b843ad949be8 (diff)
started using the refactored packages in siglog server
Diffstat (limited to 'util.go')
-rw-r--r--util.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/util.go b/util.go
deleted file mode 100644
index a8c918e..0000000
--- a/util.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package stfe
-
-import (
- ttypes "github.com/google/trillian/types"
- "github.com/system-transparency/stfe/types"
-)
-
-func NewTreeHeadFromLogRoot(lr *ttypes.LogRootV1) *types.TreeHead {
- var hash [types.HashSize]byte
- th := types.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) []*[types.HashSize]byte {
- var path []*[types.HashSize]byte
- for _, hash := range hashes {
- var h [types.HashSize]byte
- copy(h[:], hash)
- path = append(path, &h)
- }
- return path
-}