rename 'hash v2' to 'commitment'

This commit is contained in:
tevador
2023-09-08 22:57:09 +02:00
parent db273f2671
commit 07a413b9f0
4 changed files with 26 additions and 26 deletions
+5 -5
View File
@@ -401,14 +401,14 @@ extern "C" {
machine->getFinalResult(output, RANDOMX_HASH_SIZE);
}
void randomx_calculate_hash_v2(const void* input, size_t inputSize, const void* v1_in, void* v2_out) {
void randomx_calculate_commitment(const void* input, size_t inputSize, const void* hash_in, void* com_out) {
assert(inputSize == 0 || input != nullptr);
assert(v1_in != nullptr);
assert(v2_out != nullptr);
assert(hash_in != nullptr);
assert(com_out != nullptr);
blake2b_state state;
blake2b_init(&state, RANDOMX_HASH_SIZE);
blake2b_update(&state, input, inputSize);
blake2b_update(&state, v1_in, RANDOMX_HASH_SIZE);
blake2b_final(&state, v2_out, RANDOMX_HASH_SIZE);
blake2b_update(&state, hash_in, RANDOMX_HASH_SIZE);
blake2b_final(&state, com_out, RANDOMX_HASH_SIZE);
}
}