ingest.hpp 872 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __INGEST_HPP__
  2. #define __INGEST_HPP__
  3. struct ClientList {
  4. uint32_t num;
  5. uint32_t start;
  6. uint32_t end;
  7. sgx_aes_gcm_128bit_key_t *keys;
  8. };
  9. class Ingestion{
  10. private:
  11. ClientList clients;
  12. MsgBuffer buffer;
  13. uint32_t max_buffer_size;
  14. public:
  15. Ingestion() {
  16. }
  17. void generateClientKeys(sgx_aes_gcm_128bit_key_t &ESK);
  18. void initialize(uint32_t cnum, uint32_t cstart, sgx_aes_gcm_128bit_key_t &ESK);
  19. uint32_t getClientNum() {
  20. return (clients.num);
  21. }
  22. uint32_t getClientStart() {
  23. return (clients.start);
  24. }
  25. sgx_aes_gcm_128bit_key_t* getClientKeys() {
  26. return (clients.keys);
  27. }
  28. bool authenticate(clientid_t cid, unsigned char *auth_string);
  29. bool processMsgBundle(clientid_t cid, unsigned char *msgbundle,
  30. uint32_t num_msgs);
  31. };
  32. extern Ingestion g_ing;
  33. #endif