diff options
Diffstat (limited to 'src/plop.hrl')
-rw-r--r-- | src/plop.hrl | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/plop.hrl b/src/plop.hrl index bfd900b..7275f5a 100644 --- a/src/plop.hrl +++ b/src/plop.hrl @@ -1,21 +1,29 @@ -%% A plop_entry has a type and some data. -%% A plop_data record has the meta data necessary for constructing a -%% signed timestamp. +-type signature_type() :: certificate_timestamp | tree_hash | test. +-type entry_type() :: x509 | precert | test. --record(plop_data, { +%% @doc The parts of an SPT which is to be signed. +-record(spt, { version = 1 :: integer(), - signature_type = certificate_timestamp :: certificate_timestamp | - tree_hash | - test, + signature_type :: signature_type(), timestamp = now :: 'now' | integer(), entry :: plop_entry() }). +-type spt() :: #spt{}. + -record(plop_entry, { - type = x509 :: x509 | precert | test, + type :: entry_type(), data = <<>> :: binary() }). - --type plop_data() :: #plop_data{}. -type plop_entry() :: #plop_entry{}. --export_type([plop_data/0, plop_entry/0]). +%% @doc The parts of an STH which is to be signed. +-record(sth, { + version = 1 :: integer(), + signature_type :: signature_type(), + timestamp = now :: 'now' | integer(), + tree_size :: integer(), + root_hash :: binary() % sha256 + }). +-type sth() :: #sth{}. + +-export_type([plop_entry/0, entry_type/0]). |