| 123456789101112131415161718192021222324252627282930 |
- //
- // Created by miti on 21/07/19.
- //
- #ifndef DECRYPTORAPP_PROTOBUFSGXTRANSFORMSHELPER_H
- #define DECRYPTORAPP_PROTOBUFSGXTRANSFORMSHELPER_H
- #include "ProtobufLAMessages.pb.h"
- #define __STDC_FORMAT_MACROS
- #include <inttypes.h>
- #include <stdio.h>
- #include "sgx_report.h"
- #include "sgx_eid.h"
- #include "sgx_dh.h"
- #define SGX_REPORT_BODY_RESERVED1 28
- #define SGX_REPORT_BODY_RESERVED2 32
- #define SGX_REPORT_BODY_RESERVED3 96
- #define SGX_REPORT_BODY_RESERVED4 60
- namespace protobufSgxTransformsHelper {
- void encode_ec256_public_key_to_protobuf(protobuf_sgx_ec256_public_t* protobuf_g_a , sgx_ec256_public_t* g_a);
- int decode_ec256_public_key_from_protobuf(protobuf_sgx_ec256_public_t* protobuf_g_a , sgx_ec256_public_t* g_a);
- void encode_attributes_to_protobuf(protobuf_sgx_attributes_t* protobuf_attributes, sgx_attributes_t* attributes);
- int decode_attributes_from_protobuf(protobuf_sgx_attributes_t* protobuf_attributes, sgx_attributes_t* attributes);
- void encode_report_to_protobuf(protobuf_sgx_report_t* protobuf_report, sgx_report_t* report);
- int decode_report_from_protobuf(protobuf_sgx_report_t* protobuf_report, sgx_report_t* report);
- int fit_32_into_uint8_t(google::protobuf::uint32 temp32, uint8_t* temp8);
- };
- #endif //DECRYPTORAPP_PROTOBUFSGXTRANSFORMSHELPER_H
|