Added crypto init

parent 93849aec
...@@ -123,19 +123,6 @@ bool hex2carray(const char * _hex, uint64_t *_bin_len, ...@@ -123,19 +123,6 @@ bool hex2carray(const char * _hex, uint64_t *_bin_len,
} }
void init_daemon() {
libff::init_alt_bn128_params();
// Set up database connection information and open database
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "./keysdb", &db);
}
bool sign(const char* _encryptedKeyHex, const char* _hashHex, size_t _t, size_t _n, size_t _signerIndex, bool sign(const char* _encryptedKeyHex, const char* _hashHex, size_t _t, size_t _n, size_t _signerIndex,
......
...@@ -74,3 +74,4 @@ int init_server() { ...@@ -74,3 +74,4 @@ int init_server() {
s.StartListening(); s.StartListening();
return 0; return 0;
} }
...@@ -34,3 +34,17 @@ void init_all() { ...@@ -34,3 +34,17 @@ void init_all() {
init_enclave(); init_enclave();
init_daemon(); init_daemon();
} }
void init_daemon() {
libff::init_alt_bn128_params();
// Set up database connection information and open database
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "./keysdb", &db);
}
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