Unverified Commit 461d4baf authored by kladko's avatar kladko

SKALE-2895-fix-build-and-docs

parent dc13eb58
...@@ -129,6 +129,11 @@ void *reallocate_function(void *ptr, size_t osize, size_t nsize) { ...@@ -129,6 +129,11 @@ void *reallocate_function(void *ptr, size_t osize, size_t nsize) {
} }
void get_global_random(unsigned char* _randBuff) { void get_global_random(unsigned char* _randBuff) {
sgx_sha_state_handle_t shaStateHandle;
sgx_sha256_init(&shaStateHandle);
sgx_sha256_update(globalRandom, 32, shaStateHandle);
sgx_sha256_get_hash(shaStateHandle, globalRandom);
sgx_sha256_close(shaStateHandle);
memcpy(_randBuff, globalRandom, 32); memcpy(_randBuff, globalRandom, 32);
} }
......
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