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,
......
...@@ -73,4 +73,5 @@ int init_server() { ...@@ -73,4 +73,5 @@ int init_server() {
JSONRPC_SERVER_V1V2); // hybrid server (json-rpc 1.0 & 2.0) JSONRPC_SERVER_V1V2); // hybrid server (json-rpc 1.0 & 2.0)
s.StartListening(); s.StartListening();
return 0; return 0;
} }
\ No newline at end of file
...@@ -33,4 +33,18 @@ void init_all() { ...@@ -33,4 +33,18 @@ void init_all() {
init_server(); init_server();
init_enclave(); init_enclave();
init_daemon(); init_daemon();
} }
\ No newline at end of file
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