-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCryptoEnclave_t.h
38 lines (29 loc) · 1.63 KB
/
CryptoEnclave_t.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef CRYPTOENCLAVE_T_H__
#define CRYPTOENCLAVE_T_H__
#include <stdint.h>
#include <wchar.h>
#include <stddef.h>
#include "sgx_edger8r.h" /* for sgx_ocall etc. */
#include <stdlib.h> /* for size_t */
#define SGX_CAST(type, item) ((type)(item))
#ifdef __cplusplus
extern "C" {
#endif
void ecall_init(unsigned char* keyF, size_t len);
void ecall_addDoc(char* doc_id, size_t id_length, char* content, int content_length);
void ecall_delDoc(char* doc_id, size_t id_length);
void ecall_search(const char* keyword, size_t len);
sgx_status_t SGX_CDECL ocall_print_string(const char* str);
sgx_status_t SGX_CDECL ocall_transfer_encrypted_entries(const void* t1_u_arr, const void* t1_v_arr, int pair_count, int rand_size);
sgx_status_t SGX_CDECL ocall_retrieve_encrypted_doc(const char* del_id, size_t del_id_len, unsigned char* encrypted_content, size_t maxLen, int* length_content, size_t int_len);
sgx_status_t SGX_CDECL ocall_del_encrypted_doc(const char* del_id, size_t del_id_len);
sgx_status_t SGX_CDECL ocall_query_tokens_entries(const void* Q_w_u_arr, const void* Q_w_id_arr, int pair_count, int rand_size);
sgx_status_t SGX_CDECL sgx_oc_cpuidex(int cpuinfo[4], int leaf, int subleaf);
sgx_status_t SGX_CDECL sgx_thread_wait_untrusted_event_ocall(int* retval, const void* self);
sgx_status_t SGX_CDECL sgx_thread_set_untrusted_event_ocall(int* retval, const void* waiter);
sgx_status_t SGX_CDECL sgx_thread_setwait_untrusted_events_ocall(int* retval, const void* waiter, const void* self);
sgx_status_t SGX_CDECL sgx_thread_set_multiple_untrusted_events_ocall(int* retval, const void** waiters, size_t total);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif