This implements encoding of the structure defined in

IMPORTANT: Because SCT records timestamps in milliseconds rather than seconds, this module requires a 64-bit Perl interpreter.

SEE ALSO has an excellent walkthrough of the format that this module deals with.


encode( %opts )

For now this always encodes a version 1 structure.

%opts is:

  • key_id - 32-byte string

  • timestamp - integer (NB: milliseconds)

  • hash_algorithm - See for allowed values (e.g., sha256).

  • signature_algorithm - Currently accepted values are rsa and ecdsa. (cf. the URL for hash_algorithm values)

  • signature - The signature (binary string).