We need to settle on one Hash function implementation for now.
Host function signature: svm_hash(start: i32, end: i32, result_ptr: i32)
The function should get as input a Blob of bytes given in the form of:
Blob first Memory Address - this is the start above.
Blob last Memory Address - this is the end above.
The svm_hash function will compute the Hash over the Blob of bytes and copy it to Memory starting from the result_ptr given as a parameter.
It's the responsibility of the caller to allocate upfront the Memory to hold the Hash.
The caller will know the size of the Hash since it is a constant and known-ahead size.
We need to settle on one Hash function implementation for now.
Host function signature:
svm_hash(start: i32, end: i32, result_ptr: i32)
The function should get as input a Blob of bytes given in the form of:
start
above.end
above.The
svm_hash
function will compute the Hash over the Blob of bytes and copy it to Memory starting from theresult_ptr
given as a parameter.It's the responsibility of the caller to allocate upfront the Memory to hold the Hash. The caller will know the size of the Hash since it is a constant and known-ahead size.