in cvm-attestation/src/ReportParser.py [0:0]
def extract_report_type(report):
"""
Extract the report type from the HCL report blob
Parameters:
report (bytes): The HCL report blob.
Returns:
str: The report type as string based on REPORT_TYPE table
"""
list = []
for i in range(HCL_REPORT_TYPE_OFFSET_START, HCL_REPORT_TYPE_OFFSET_START + 4):
list.append(report[i])
request_type = int.from_bytes(bytes(list), byteorder='little', signed=False)
return REPORT_TYPE[request_type]