mirror of
https://github.com/encryptogroup/PSI.git
synced 2024-03-22 13:30:44 +08:00
More stable compilation for glib2.0, replaced name for hash routine by psi_hashing_function to avoid redifinition by external projects
This commit is contained in:
parent
f9de56be8d
commit
294e94256d
4
Makefile
4
Makefile
|
@ -22,10 +22,10 @@ MIRACL_MAKE:=linux
|
|||
GNU_LIB_PATH:=i386
|
||||
endif
|
||||
|
||||
INCLUDE=-I.. -I/usr/include/glib-2.0/ -I/usr/lib/${GNU_LIB_PATH}-linux-gnu/glib-2.0/include
|
||||
INCLUDE=-I.. -I/usr/include/glib-2.0/ -I/usr/lib/${GNU_LIB_PATH}-linux-gnu/glib-2.0/include `pkg-config --cflags glib-2.0`
|
||||
|
||||
|
||||
LIBRARIES=-lgmp -lgmpxx -lpthread -L /usr/lib -lssl -lcrypto -lglib-2.0
|
||||
LIBRARIES=-lgmp -lgmpxx -lpthread -L /usr/lib -lssl -lcrypto -lglib-2.0 `pkg-config --libs glib-2.0`
|
||||
CFLAGS=
|
||||
|
||||
# all source files and corresponding object files
|
||||
|
|
|
@ -75,7 +75,7 @@ uint32_t naivepsi(role_type role, uint32_t neles, uint32_t pneles, task_ctx ectx
|
|||
ectx.eles.perm = perm;
|
||||
ectx.sctx.symcrypt = crypt_env;
|
||||
|
||||
run_task(ntasks, ectx, hash);
|
||||
run_task(ntasks, ectx, psi_hashing_function);
|
||||
|
||||
phashes = (uint8_t*) malloc(sizeof(uint8_t) * pneles * maskbytelen);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ uint32_t dhpsi(role_type role, uint32_t neles, uint32_t pneles, task_ctx ectx, c
|
|||
#ifdef DEBUG
|
||||
cout << "Hashing elements" << endl;
|
||||
#endif
|
||||
run_task(ntasks, ectx, hash);
|
||||
run_task(ntasks, ectx, psi_hashing_function);
|
||||
|
||||
/* Encrypt elements */
|
||||
ectx.eles.input1d = hashes;
|
||||
|
@ -141,7 +141,7 @@ uint32_t dhpsi(role_type role, uint32_t neles, uint32_t pneles, task_ctx ectx, c
|
|||
#ifdef DEBUG
|
||||
cout << "Hashing elements" << endl;
|
||||
#endif
|
||||
run_task(ntasks, ectx, hash);
|
||||
run_task(ntasks, ectx, psi_hashing_function);
|
||||
|
||||
#ifdef DEBUG
|
||||
cout << "Exchanging hashes" << endl;
|
||||
|
|
|
@ -203,7 +203,7 @@ uint32_t client_routine(uint32_t neles, task_ctx ectx, uint32_t* matches,
|
|||
ectx.sctx.symcrypt = crypt_env;
|
||||
ectx.sctx.keydata = (uint8_t*) const_seed;
|
||||
|
||||
run_task(ntasks, ectx, hash);
|
||||
run_task(ntasks, ectx, psi_hashing_function);
|
||||
|
||||
socket->Send(masks, maskbytelen * neles);
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ static void *sym_encrypt(void* context) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void *hash(void* context) {
|
||||
static void *psi_hashing_function(void* context) {
|
||||
#ifdef DEBUG
|
||||
cout << "Hashing thread started" << endl;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user