aboutsummaryrefslogtreecommitdiff
path: root/pkg/types/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/types/util.go')
-rw-r--r--pkg/types/util.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/pkg/types/util.go b/pkg/types/util.go
deleted file mode 100644
index 3cd7dfa..0000000
--- a/pkg/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...))
-}