pub unsafe extern "C" fn sha256_chain(
seed: *const c_void,
seed_length: size_t,
elements: size_t,
tail_element: *mut c_void,
) -> *mut c_void
Expand description
@brief function to produce a hash chain starting with a given seed element. The chain is computed by taking the sha256 from the seed, hash the resulting sha256 and continuing taking sha256 from each result consecutively.
@param[in] seed the seed of the sha256-chain, i.e. the first element @param[in] seed_length the size of seed in bytes @param[in] elements the number of chained elements, i.e. the index of the last element is (elements-1) @param[out] tail_element the final element of the sha256-chain
@returns pointer to tail_element