SKALE-3661 fix hashing

parent 734b1572
......@@ -345,7 +345,13 @@ int hash_key(char* key, char* hashed_key) {
return ret;
}
ret = sgx_sha256_msg((uint8_t*)key, ECDSA_SKEY_LEN - 1, (uint8_t*)hashed_key);
uint8_t key_to_hash[33];
uint64_t len;
if (!hex2carray(key, &len, key_to_hash)) {
return ret;
}
ret = sgx_sha256_msg(key_to_hash, ECDSA_BIN_LEN - 1, (uint8_t*)hashed_key);
return ret;
}
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