aboutsummaryrefslogtreecommitdiff
path: root/pkg/types/crypto.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/types/crypto.go')
-rw-r--r--pkg/types/crypto.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/pkg/types/crypto.go b/pkg/types/crypto.go
deleted file mode 100644
index df93108..0000000
--- a/pkg/types/crypto.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package types
-
-import (
- "crypto/ed25519"
- "crypto/sha256"
-)
-
-const (
- HashSize = sha256.Size
- SignatureSize = ed25519.SignatureSize
- PublicKeySize = ed25519.PublicKeySize
-
- LeafNodePrefix = byte(0x00)
- InteriorNodePrefix = byte(0x01)
-)
-
-type (
- Hash [HashSize]byte
- Signature [SignatureSize]byte
- PublicKey [PublicKeySize]byte
-)
-
-func HashFn(buf []byte) *Hash {
- var hash Hash = sha256.Sum256(buf)
- return &hash
-}
-
-func LeafHash(buf []byte) *Hash {
- return HashFn(append([]byte{LeafNodePrefix}, buf...))
-}