Module vm

Source

Structs§

randomx_vm

Functions§

randomx_calculate_hash
Calculates a RandomX hash value. @param machine is a pointer to a randomx_vm structure. Must not be NULL. @param input is a pointer to memory to be hashed. Must not be NULL. @param inputSize is the number of bytes to be hashed. @param output is a pointer to memory where the hash will be stored. Must not be NULL and at least RANDOMX_HASH_SIZE bytes must be available for writing.
randomx_calculate_hash_first
Set of functions used to calculate multiple RandomX hashes more efficiently. randomx_calculate_hash_first will begin a hash calculation. randomx_calculate_hash_next will output the hash value of the previous input and begin the calculation of the next hash. randomx_calculate_hash_last will output the hash value of the previous input. WARNING: These functions may alter the floating point rounding mode of the calling thread.
randomx_calculate_hash_last
randomx_calculate_hash_next
randomx_create_vm
Creates and initializes a RandomX virtual machine.
randomx_destroy_vm
Releases all memory occupied by the randomx_vm structure. @param machine is a pointer to a previously created randomx_vm structure.
randomx_vm_set_cache
Reinitializes a virtual machine with a new Cache. This function should be called anytime the Cache is reinitialized with a new key. Does nothing if called with a Cache containing the same key value as already set.
randomx_vm_set_dataset
Reinitializes a virtual machine with a new Dataset. @param machine is a pointer to a randomx_vm structure that was initialized with RANDOMX_FLAG_FULL_MEM. Must not be NULL. @param dataset is a pointer to an initialized randomx_dataset structure. Must not be NULL.