Commit cf942c69 authored by yiwenshao's avatar yiwenshao

able to use simple strategy for load

parent e437ad25
......@@ -102,16 +102,17 @@ std::shared_ptr<ReturnMeta> getReturnMeta(std::vector<FieldMeta*> fms,
int pos=0;
//construct OLK
for(auto i=0u;i<tfds.size();i++){
onion o = tfds[i].getChoosenOnionO()[0];
int index = getDecryptionOnionIndex(tfds);
onion o = tfds[i].getChoosenOnionO()[index];
SECLEVEL l = tfds[i].getOriginalFieldMeta()->getOnionMeta(o)->getSecLevel();
FieldMeta *k = tfds[i].getOriginalFieldMeta();
OLK curOLK(o,l,k);
addToReturn(myReturnMeta.get(),pos++,curOLK,true,k->getFieldName());
addSaltToReturn(myReturnMeta.get(),pos++);
ggbt.field_types.push_back(tfds[i].getChoosenFieldTypes()[0]);
ggbt.field_names.push_back(tfds[i].getChoosenOnionName()[0]);
ggbt.field_lengths.push_back(tfds[i].getChoosenFieldLengths()[0]);
ggbt.field_types.push_back(tfds[i].getChoosenFieldTypes()[index]);
ggbt.field_names.push_back(tfds[i].getChoosenOnionName()[index]);
ggbt.field_lengths.push_back(tfds[i].getChoosenFieldLengths()[index]);
ggbt.field_types.push_back(tfds[i].getSaltType());
ggbt.field_names.push_back(tfds[i].getSaltName());
ggbt.field_lengths.push_back(tfds[i].getSaltLength());
......
......@@ -400,3 +400,13 @@ void storeStrategies(std::vector<FieldMetaTrans>& res){
}
}
int getDecryptionOnionIndex(std::vector<FieldMetaTrans>& fdtrans) {
int res = 0;
return res;
}
......@@ -152,3 +152,5 @@ enum class STORE_STRATEGY{
FIRST,
ALL
};
int getDecryptionOnionIndex(std::vector<FieldMetaTrans>& res);
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