pub struct RandomxVm<'a, T: 'a> { /* fields omitted */ }
Calculate the RandomX hash of some data.
use randomx_bindings::*;
let flags = RandomxFlags::default();
let cache = RandomxCache::new(flags, "key".as_bytes())?;
let vm = RandomxVm::new(flags, &cache)?;
let hash = vm.hash("input".as_bytes());
Executes the destructor for this type. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.