26 if (data.size() !=
size())
28 throw std::logic_error(fmt::format(
29 "Cannot initialise AttestationReportData with data of size {}, "
35 std::copy(data.data(), data.data() + data.size(),
report_data.data());
40 static constexpr size_t virtual_attestation_report_data_size = 32;
45 static constexpr size_t sgx_attestation_report_data_size = 32;
50 static constexpr size_t snp_attestation_report_data_size = 64;
62 data(hash.h.begin(), hash.h.end())
67 data(report_data.report_data.begin(), report_data.report_data.end())
72 return ds::to_hex(
data);
77 std::span<const uint8_t, ccf::crypto::Sha256Hash::SIZE> s(
Definition sha256_hash.h:16
static Sha256Hash from_span(const std::span< const uint8_t, SIZE > &sp)
Definition sha256_hash.cpp:73
static constexpr size_t SIZE
Definition sha256_hash.h:18
Definition attestation.h:20
Definition report_data.h:15
std::array< uint8_t, N > report_data
Definition report_data.h:16
AttestationReportData()=default
static size_t size()
Definition report_data.h:18
AttestationReportData(std::span< const uint8_t > data)
Definition report_data.h:24