aboutsummaryrefslogtreecommitdiff
path: root/types/serialize.go
diff options
context:
space:
mode:
Diffstat (limited to 'types/serialize.go')
-rw-r--r--types/serialize.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/types/serialize.go b/types/serialize.go
index da4bd9f..af0a1ed 100644
--- a/types/serialize.go
+++ b/types/serialize.go
@@ -6,6 +6,22 @@ import (
"github.com/google/certificate-transparency-go/tls"
)
+const (
+ HashSizeV1 = 32
+)
+
+// GetProofByHashV1 is a serializable get-proof-by-hash request
+type GetProofByHashV1 struct {
+ Hash [HashSizeV1]byte
+ TreeSize uint64
+}
+
+// GetConsistencyProofV1 is a serializable get-consistency-proof request
+type GetConsistencyProofV1 struct {
+ First uint64
+ Second uint64
+}
+
// Marshal marshals a TLS-encodable structure
func Marshal(item interface{}) ([]byte, error) {
serialized, err := tls.Marshal(item)