Added init

parent a3c8adac
......@@ -68,10 +68,18 @@ libff::alt_bn128_Fr *keyFromString(const char* _keyString) {
return new libff::alt_bn128_Fr(_keyString);
}
bool check_key(int *err_status, char *err_string, const char *_keyString) {
int inited = 0;
void init() {
if (inited == 1)
return;
inited = 1;
libff::init_alt_bn128_params();
}
bool check_key(int *err_status, char *err_string, const char *_keyString) {
......
......@@ -26,5 +26,7 @@ EXTERNC void carray2Hex(const unsigned char *d, int _len, char* _hexArray);
EXTERNC bool hex2carray(const char * _hex, uint64_t *_bin_len,
uint8_t* _bin );
EXTERNC void init();
#endif //SGXWALLET_BLSUTILS_H
This diff is collapsed.
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