Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
9f6ae485
Commit
9f6ae485
authored
Jan 10, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add two maps string_to_onion and string_to_seclevel in util/onions.cc
parent
dcdbd150
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
onions.cc
util/onions.cc
+26
-0
onions.hh
util/onions.hh
+5
-0
No files found.
util/onions.cc
View file @
9f6ae485
#include "util/onions.hh"
std
::
map
<
std
::
string
,
onion
>
string_to_onion
{
{
"oDET"
,
oDET
},
{
"oOPE"
,
oOPE
},
{
"oAGG"
,
oAGG
},
{
"oSWP"
,
oSWP
},
{
"oPLAIN"
,
oPLAIN
},
{
"oBESTEFFORT"
,
oBESTEFFORT
},
{
"oASHE"
,
oASHE
},
{
"oINVALID"
,
oINVALID
}
};
std
::
map
<
std
::
string
,
SECLEVEL
>
string_to_seclevel
=
{
{
"INVALID"
,
SECLEVEL
::
INVALID
},
{
"PLAINVAL"
,
SECLEVEL
::
PLAINVAL
},
{
"OPEFOREIGN"
,
SECLEVEL
::
OPEFOREIGN
},
{
"OPE"
,
SECLEVEL
::
OPE
},
{
"DETJOIN"
,
SECLEVEL
::
DETJOIN
},
{
"DET"
,
SECLEVEL
::
DET
},
{
"SEARCH"
,
SECLEVEL
::
SEARCH
},
{
"HOM"
,
SECLEVEL
::
HOM
},
{
"ASHE"
,
SECLEVEL
::
ASHE
},
{
"RND"
,
SECLEVEL
::
RND
}
};
util/onions.hh
View file @
9f6ae485
...
@@ -18,6 +18,8 @@ typedef enum onion {
...
@@ -18,6 +18,8 @@ typedef enum onion {
oINVALID
,
oINVALID
,
}
onion
;
}
onion
;
extern
std
::
map
<
std
::
string
,
onion
>
string_to_onion
;
//Sec levels ordered such that
//Sec levels ordered such that
// if a is less secure than b.
// if a is less secure than b.
// a appears before b
// a appears before b
...
@@ -36,6 +38,9 @@ enum class SECLEVEL {
...
@@ -36,6 +38,9 @@ enum class SECLEVEL {
RND
,
RND
,
};
};
extern
std
::
map
<
std
::
string
,
SECLEVEL
>
string_to_seclevel
;
//Onion layouts - initial structure of onions
//Onion layouts - initial structure of onions
typedef
std
::
map
<
onion
,
std
::
vector
<
SECLEVEL
>
>
onionlayout
;
typedef
std
::
map
<
onion
,
std
::
vector
<
SECLEVEL
>
>
onionlayout
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment