Commit bb8d4480 authored by yiwenshao's avatar yiwenshao

final_load.cc first version

parent 86165e20
......@@ -191,9 +191,20 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
//为什么这里不是push item??
// append_list->push_back(&(const_cast<Item&>(i)));
//do not use the plain strategy
std::vector<Item *> l;
my_typical_rewrite_insert_type(i,fm,a,&l);
const uint64_t salt = fm.getHasSalt() ? randomValue() : 0;
uint64_t IV = salt;
for (auto it : fm.orderedOnionMetas()) {
const onion o = it.first->getValue();
OnionMeta * const om = it.second;
l.push_back(my_encrypt_item_layers(i, o, *om, a, IV));
}
if (fm.getHasSalt()) {
l.push_back(new Item_int(static_cast<ulonglong>(salt)));
}
for (auto it : l) {
append_list->push_back(it);
}
......
......@@ -223,7 +223,6 @@ main(int argc, char* argv[]){
/*load and decrypt*/
ResType res = load_files(db,table);
/*transform*/
rawMySQLReturnValue str;
transform_to_rawMySQLReturnValue(str,res);
......
OBJDIRS += util
UTILSRC := onions.cc cryptdb_log.cc ctr.cc util.cc version.cc et.cc
UTILSRC := onions.cc cryptdb_log.cc ctr.cc util.cc version.cc constants.cc
all: $(OBJDIR)/libedbutil.so $(OBJDIR)/libedbutil.a
......
#include "util/et.hh"
#include "util/constants.hh"
const char *cryptdb_dir = getenv("CRYPTDB_DIR");
//assert(cryptdb_dir!=NULL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment