diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2021-02-23 12:34:21 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2021-02-23 12:34:21 +0100 |
commit | 65c41183088f111aa289d1ea4c51bef7fa971226 (patch) | |
tree | 0eaa8a43898c34ca0f1cbaf12e822ef47f241d76 /types/serialize.go | |
parent | 2e8e42b09a1b2c7bd8e3557fd286a969a2fa0caf (diff) |
added proof request types
Diffstat (limited to 'types/serialize.go')
-rw-r--r-- | types/serialize.go | 16 |
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) |