MCPcopy Create free account
hub / github.com/adobe/Marinus / read_leaf_header

Function read_leaf_header

python3_cron_scripts/get_original_ct_logs.py:256–266  ·  view source on GitHub ↗

Parse the leaf header

(leaf)

Source from the content-addressed store, hash-verified

254
255
256def read_leaf_header(leaf):
257 """
258 Parse the leaf header
259 """
260 header = {}
261 header["version"] = int(leaf[0])
262 header["merkle_leaf_type"] = int(leaf[1])
263 header["timestamp"] = int.from_bytes(leaf[2:10], "big")
264 header["LogEntryType"] = int.from_bytes(leaf[10:12], "big")
265 header["Entry"] = leaf[12:]
266 return header
267
268
269def get_cert_from_leaf(logger, leaf):

Callers 1

get_cert_from_leafFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected