mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-20 08:48:45 +02:00
rename 'hash v2' to 'commitment'
This commit is contained in:
+5
-5
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user