aboutsummaryrefslogtreecommitdiff
path: root/types/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 /types/util.go
parent0285454c34b0b3003bc8ede3e304b843ad949be8 (diff)
started using the refactored packages in siglog server
Diffstat (limited to 'types/util.go')
-rw-r--r--types/util.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/types/util.go b/types/util.go
deleted file mode 100644
index 3cd7dfa..0000000
--- a/types/util.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package types
-
-import (
- "crypto/sha256"
-)
-
-const (
- LeafHashPrefix = 0x00
-)
-
-func Hash(buf []byte) *[HashSize]byte {
- var ret [HashSize]byte
- hash := sha256.New()
- hash.Write(buf)
- copy(ret[:], hash.Sum(nil))
- return &ret
-}
-
-func HashLeaf(buf []byte) *[HashSize]byte {
- return Hash(append([]byte{LeafHashPrefix}, buf...))
-}